Skip to content

Conversation

@jtschuster
Copy link
Member

@jtschuster jtschuster commented Jun 2, 2023

The generated code is in file scoped classes, so the interface and StringMarshallingCustomType need to be at least internal visibility. These changes warn if that condition isn't met.

Originally, I expected to report a diagnostic, but still generate code for the interface. This required some changes to DiagnosticOr<T> to allow it to hold both a diagnostic and a value if the diagnostic didn't cause failure. In the end those changes weren't necessary, but I left them because I can see them being valuable at some point in the future.

Completes #84662

@ghost
Copy link

ghost commented Jun 2, 2023

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

Issue Details

Builds off #86908, so wait until that is merged to review.

The generated code is in file scoped classes, so the interface and StringMarshallingCustomType need to be at least internal visibility. These changes warn if that condition isn't met.

Completes #84662

Author: jtschuster
Assignees: jtschuster
Labels:

area-System.Runtime.InteropServices

Milestone: -

@jtschuster jtschuster marked this pull request as ready for review June 2, 2023 22:28
@jtschuster jtschuster merged commit 1d9b36d into dotnet:main Jun 14, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 14, 2023
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.

[API Proposal]: Add StringMarshalling property to GeneratedComInterfaceAttribute

3 participants