Skip to content
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

Merged
merged 1 commit into from
Jun 20, 2020

Conversation

eerhardt
Copy link
Member

These types only exist in CoreCLR, they don't exist in Mono.

Contributes to #36659

See #36659 (comment)

These types only exist in CoreCLR, they don't exist in Mono.

Contributes to dotnet#36659
@Dotnet-GitSync-Bot
Copy link
Collaborator

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" />
Copy link
Member Author

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?

Copy link
Member

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.

Copy link
Member

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.

@ghost
Copy link

ghost commented Jun 20, 2020

Hello @jkotas!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@jkotas jkotas merged commit 721bea2 into dotnet:master Jun 20, 2020
@eerhardt eerhardt deleted the FixCOMILLinkTrim branch June 21, 2020 00:32
@ghost ghost locked as resolved and limited conversation to collaborators Dec 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants