-
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
Move COM ILLink.Descriptors entries to CoreCLR #38172
Conversation
These types only exist in CoreCLR, they don't exist in Mono. Contributes to dotnet#36659
I couldn't figure out the best area label to add to this PR. Please help me learn by adding exactly one area label. |
<type fullname="System.Runtime.InteropServices.CustomMarshalers.*" /> | ||
<!-- Workaround for https://github.com/mono/linker/issues/378 --> | ||
<type fullname="System.Runtime.InteropServices.IDispatch" /> | ||
<type fullname="System.Runtime.InteropServices.IMarshal" /> |
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.
Technically, this type does exist on mono when '$(TargetsWindows)' == 'true'
.
@jkotas @AaronRobinsonMSFT - do you think this is the right decision? Or should I keep it in the "shared" ILLInkTrim since that is where the type exists?
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.
The IMarshal
should only be used for the StandardOleMarshalObject
which is for COM only. Since mono doesn't support COM at all, I think any usage of StandardOleMarshalObject
on the mono runtime is technically unsupported. Therefore keeping it in coreclr is probably fine even though usage in a mono scenario would be broken. @jkotas may have another opinion but I think the risk is minimal for user impact.
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.
The support for Mono on Windows overall is incomplete in multiple ways. We are not shipping Mono as supported product (in .NET 5 at least).
Mono CoreLib does not ever define FeatureComInterop
and so it gets stubs for other COM interop parts too: https://github.com/dotnet/runtime/blob/master/src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems#L1605
A potential alternative would be to put this under FeatureComInterop
instead of Windows/Unix, but I do not think it would be material improvement. There are number of other places in libraries that depend on COM interop to work on Windows.
Hello @jkotas! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
These types only exist in CoreCLR, they don't exist in Mono.
Contributes to #36659
See #36659 (comment)