-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Don't generate Unmanaged-to-Managed stubs with diagnostics #88679
Conversation
…kip generation of the wrappers if we have any diagnostics.
Tagging subscribers to this area: @dotnet/interop-contrib Issue DetailsThis PR disables our "partial generation" feature for the unmanaged->managed stubs. The partial generation generates many invalid Fixes #82581
|
Should we change all the warnings that would produce invalid code to be errors instead? IIRC one of the warnings looks like "This parameter type is not supported. Generated code won't handle marshaling this parameter." I think it would be confusing if this warning meant that the function pointer in the VTable would be null. |
They already are errors. We have very few warnings generated by the generator nowadays. |
…use of "unnecessary" diagostics).
Failures are unrelated. |
This PR disables our "partial generation" feature for the unmanaged->managed stubs. The partial generation generates many invalid
[UnmanagedCallersOnly]
method signatures, which causes compiler errors. By disabling the generation, we ensure that the source-generated code doesn't produce any compiler errors itself.Fixes #82581