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

Provide support for exposing .NET classes to COM through source generation #83755

Merged
merged 7 commits into from
Mar 28, 2023

Conversation

jkoritzinsky
Copy link
Member

@jkoritzinsky jkoritzinsky commented Mar 21, 2023

Implement the API defined in #83471 in Ancillary.Interop and add a source generator in ComInterfaceGenerator to provide the expected behavior.

@jkoritzinsky jkoritzinsky added area-System.Runtime.InteropServices source-generator Indicates an issue with a source generator feature labels Mar 21, 2023
@jkoritzinsky jkoritzinsky added this to the 8.0.0 milestone Mar 21, 2023
@ghost ghost assigned jkoritzinsky Mar 21, 2023
@ghost
Copy link

ghost commented Mar 21, 2023

Tagging subscribers to this area: @dotnet/interop-contrib
See info in area-owners.md if you want to be subscribed.

Issue Details

Implement the API defined in #83471 in Ancillary.Interop.

Author: jkoritzinsky
Assignees: -
Labels:

area-System.Runtime.InteropServices, source-generator

Milestone: 8.0.0

…rmation type instead of the user type. This allows the generator to be more incremental as the class-info type now doesn't need the class name (so a class rename will not result in regenerating the syntax for this step).
names.Add(iface.ToDisplayString());
}
}
return new ComClassInfo(
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to warn / bail if there are no interfaces with GeneratedComInterface?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think that's still a valid scenario, but I could see us adding a warning for it. I'll file a follow-up issue for that.

{
}

public unsafe class GeneratedComClassTests
Copy link
Member

Choose a reason for hiding this comment

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

Is the plan to add some of the more complex cases (at least the ones in the ComObjectRedux repo) in a follow-up change?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I'll add those in in a follow-up change.

@jkoritzinsky
Copy link
Member Author

Uncategorized failures were #84010

@jkoritzinsky jkoritzinsky merged commit ce48579 into dotnet:main Mar 28, 2023
@jkoritzinsky jkoritzinsky deleted the ccw branch March 28, 2023 18:01
@ghost ghost locked as resolved and limited conversation to collaborators Apr 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Runtime.InteropServices source-generator Indicates an issue with a source generator feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants