-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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 a code-fix to add missing stateful marshaller shape methods #73186
Conversation
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsProvide a code-fix to add the missing marshaller methods for the stateful marshaller shape when they are not present (based on the analyzer). Testing is blocked on the API in dotnet/roslyn-sdk#1003 (the current tests will behave erratically as the non-deterministic order of diagnostics will cause issues)
|
…deterministic ordering)
…c for the code-fix testing
Add tests for the code fix for the stateful shapes.
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Outdated
Show resolved
Hide resolved
{ | ||
newMembers.Add( | ||
gen.MethodDeclaration( | ||
ShapeMemberNames.LinearCollection.Stateless.GetManagedValuesSource, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stateless
-> Stateful
in a bunch of places below. Or maybe we should put the shared names just under ShapeMemeberNames.LinearCollection
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the only ones we have shared are the ones with the same signatures. It might be worthwhile sharing the common names that represent slightly different method signatures, but I don't think that needs to be done in this PR.
Provide a code-fix to add the missing marshaller methods for the stateful marshaller shape when they are not present (based on the analyzer).
Also, update the Compiler testing platform toolset to pick up some fixes needed to test this well, and update our test suites to utilize the new features.