-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Nullable annotations metadata on non-public members #32804
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
This option is called This option is right for dotnet/runtime since we generally try to avoid reflection and we do not support 3rd party code using reflection against internal implementation details. If you would like to not set this for ASP.NET and take the size hit, that's your call to make on whether it is the right tradeoff. |
The private and compiler-generated methods in this situation aren't written by us. They're from user's applications and we're reflecting on them. Would that mean the |
I do not see anyting setting
|
Ahh, I get what is going on now. This is something that we've opted into for assemblies produced by runtime and aspnetcore. In user app assemblies this flag isn't on so the nullable metadata will always be available. My confusion was because I was testing this in an aspnetcore test assembly, which has the I think the only change here will be to turn |
Thanks for contacting us. We're moving this issue to the |
Closing but the context might be relevant for #32375 |
Description
In ASP.NET Core we want to use nullable annotations metadata to make decisions about how to call user-defined methods and local-methods/delegates. For more information, see #32375
Today that metadata is removed from private members and compiler-generated methods: dotnet/runtime#29723 (comment)
I'm guessing this was done to reduce metadata in assemblies.
Unfortunately, it means that today we can't use that information when calling compiler-generated methods and private methods.
The text was updated successfully, but these errors were encountered: