-
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
Update the CustomMarshallerAttributeFixer to support adding missing methods for stateless marshaller shapes #72869
Update the CustomMarshallerAttributeFixer to support adding missing methods for stateless marshaller shapes #72869
Conversation
…ds for the stateless value shape. One test is disabled because there's a bug in the roslyn-sdk that I found.
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsOne test is disabled against a bug in the Roslyn SDK that I found.
|
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Outdated
Show resolved
Hide resolved
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Outdated
Show resolved
Hide resolved
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Show resolved
Hide resolved
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Show resolved
Hide resolved
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Outdated
Show resolved
Hide resolved
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Outdated
Show resolved
Hide resolved
} | ||
|
||
private static ITypeSymbol? GetManagedTypeInAttributeSyntax(Location locationInAttribute, INamedTypeSymbol? attributedTypeSymbol) | ||
=> (ITypeSymbol)attributedTypeSymbol.GetAttributes().First(attr => |
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.
Isn't attributedTypeSymbol
nullable? Was this checked somewhere?
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 need to figure out what's going on here in our infra. I feel like the nullable warnings have been suppressed for some reason. I've been getting weird stuff like this for a bit (where obvious places for warnings aren't showing up)
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 haven't had a chance to investigate what's going on with our infrastructure. In the meantime, I've updated the nullability annotations here based on usage to be more accurate and added a comment explaining why we don't need to worry about nulls here.
...me.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeAnalyzer.cs
Show resolved
Hide resolved
...ntime.InteropServices/gen/LibraryImportGenerator/Analyzers/CustomMarshallerAttributeFixer.cs
Outdated
Show resolved
Hide resolved
...portGenerator.UnitTests/CustomMarshallerAttributeFixerTests_StatelessValueShapeValidation.cs
Show resolved
Hide resolved
TImeouts are a known issue. |
One test is disabled against a bug in the Roslyn SDK that I found.