-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove System.Drawing code that doesn't work #54245
Conversation
This code only runs on macOS, and expects mono's System.Windows.Forms assembly is loaded into the process. This is causing trim warnings, and it is easier just to delete this code than try to make ILLink happy. This code is only called from Graphics.FromHwnd, which doesn't work because the Carbon.framework no longer exists on macOS. Issue dotnet#22221 is tracking the test failures that use FromHwnd.
Tagging subscribers to this area: @safern, @tarekgh Issue DetailsThis code only runs on macOS, and expects mono's System.Windows.Forms assembly is loaded into the process. This is causing trim warnings, and it is easier just to delete this code than try to make ILLink happy. This code is only called from Graphics.FromHwnd, which doesn't work because the Carbon.framework no longer exists on macOS. Issue #22221 is tracking the test failures that use FromHwnd. Tagging the mono runtime devs I think might be interested here: @lambdageek @vargaz @marek-safar @steveisok @lewing @SamMonoRT
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. If we ever want to support this we needed to rewrite it anyway because Carbon framework is no longer available in our supported macOS platforms. We would need to use Cocoa.
/azp run |
You have several pipelines (over 10) configured to build pull requests in this repository. Specify which pipelines you would like to run by using /azp run [pipelines] command. You can specify multiple pipelines using a comma separated list. |
/azp run runtime |
Azure Pipelines successfully started running 1 pipeline(s). |
Test failure is #54301. |
@safern FYI the Carbon.framework still exists on an M1 Big Sur, not sure where you saw it being removed. |
Our code doesn't appear to work on my mac: Console.WriteLine(Graphics.FromHwnd(IntPtr.Zero)); Causes the following exception:
This seems to be similar: https://bugzilla.xamarin.com/56/56613/bug.html |
I followed up with @akoeplinger and it is not like that the framework was removed but a lot of the APIs were removed, so some entry points we use no longer exist in the shared library. |
This code only runs on macOS, and expects mono's System.Windows.Forms assembly is loaded into the process. This is causing trim warnings, and it is easier just to delete this code than try to make ILLink happy.
This code is only called from Graphics.FromHwnd, which doesn't work because the Carbon.framework no longer exists on macOS. Issue #22221 is tracking the test failures that use FromHwnd.
Tagging the mono runtime devs I think might be interested here: @lambdageek @vargaz @marek-safar @steveisok @lewing @SamMonoRT