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

Do not say the wrong default behavior for blittable arrays in ComInterfaceGenerator warning #88212

Merged
merged 33 commits into from
Jul 13, 2023

Conversation

jtschuster
Copy link
Member

@jtschuster jtschuster commented Jun 29, 2023

Fixes #88205. The warning used to say the default is [In] for blittable arrays, when the default is [In, Out].

Reworks how Unnecessary / Not supported / supported [In, Out] diagnostic reporting is implemented. Each marshaller will decide which details are provided with the diagnostic and which attributes are unnecessary.

Shares a single Strings.resx with all projects. "Com" or "LibraryImport" suffixes were added to string names that conflicted.

@ghost
Copy link

ghost commented Jun 29, 2023

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

Issue Details

Fixes #88205. The warning used to say the default is [In] for blittable arrays, when the default is [In, Out].

Author: jtschuster
Assignees: -
Labels:

area-System.Runtime.InteropServices

Milestone: -

jtschuster and others added 4 commits July 11, 2023 09:41
…erop.SourceGeneration/Marshalling/ByValueContentsMarshalKindValidator.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
…kip generation of the wrappers if we have any diagnostics.
jtschuster and others added 8 commits July 11, 2023 15:13
…erop.SourceGeneration/Marshalling/ByValueMarshalKindSupportDescriptor.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
…erop.SourceGeneration/Marshalling/CustomTypeMarshallingGenerator.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
…erop.SourceGeneration/Marshalling/DelegateMarshaller.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
…enerator/Marshallers/ComInterfaceDispatchMarshallerFactory.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
…erop.SourceGeneration/Marshalling/ByValueMarshalKindSupportDescriptor.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
…erop.SourceGeneration/Marshalling/ByValueMarshalKindSupportDescriptor.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
…erop.SourceGeneration/Marshalling/ByValueContentsMarshalKindValidator.cs

Co-authored-by: Jeremy Koritzinsky <jkoritzinsky@gmail.com>
Copy link
Member

@jkoritzinsky jkoritzinsky left a comment

Choose a reason for hiding this comment

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

My only remaining concern is the commented-out test cases in CompileFails.cs. Let's either enable them or open an issue and add that issue link before them (as we can't use [ActiveIssue] for specific test cases).

@jtschuster
Copy link
Member Author

Failures are known

@jtschuster jtschuster merged commit d361507 into dotnet:main Jul 13, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 13, 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.

ComInterfaceGenerator provides confusing warning for arrays with [InAttribute]
2 participants