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

Remove managed interfaces impls defined in CoreCLR #105965

Conversation

AaronRobinsonMSFT
Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT commented Aug 5, 2024

The IReflect implementation can be removed since we missed a supporting type after we brought this back in dotnet/coreclr#21343. The supporting type is System.Runtime.InteropServices.ComTypes.IReflect, which is needed for it to work at all. Thus, this scenario has never worked in .NET Core.

Implement IDynamicInterfaceCastable on __ComObject to avoid managed interface definitions in unmanaged code - IEnumerable and IEnumerator. In an effort to ensure existing users are supported, ICustomAdapter is available when either of the previous two are supported. This allows us to remove the FCall forwarders that simulated a type of DIM for RCWs that implemented a conforming IDispatch or IEnumVARIANT.

Verified that EnumerableToDispatchMarshaler is not emitted by TlbImp.

Copy link
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@AaronRobinsonMSFT AaronRobinsonMSFT added this to the 10.0.0 milestone Aug 14, 2024
@AaronRobinsonMSFT AaronRobinsonMSFT marked this pull request as ready for review August 14, 2024 23:55
@AaronRobinsonMSFT
Copy link
Member Author

/cc @dotnet/interop-contrib

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Member

@elinor-fung elinor-fung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay!

@AaronRobinsonMSFT AaronRobinsonMSFT merged commit 0d8e565 into dotnet:main Aug 17, 2024
96 checks passed
@AaronRobinsonMSFT AaronRobinsonMSFT deleted the remove_managed_interfaces_in_runtime branch August 17, 2024 00:12
AaronRobinsonMSFT added a commit to AaronRobinsonMSFT/runtime that referenced this pull request Aug 20, 2024
It appears that after dotnet#105965, the
compiler is no longer inlining `TypeHandle::IsArray` for
this code path. This deconstructs that use and reclaims it.
AaronRobinsonMSFT added a commit that referenced this pull request Aug 21, 2024
…06730)

It appears that after #105965, the
compiler is no longer inlining `TypeHandle::IsArray` for
this code path. This deconstructs that use and reclaims it.
@github-actions github-actions bot locked and limited conversation to collaborators Sep 16, 2024
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.

3 participants