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

Replace our nullability decoding with the new BCL API #26967

Merged
merged 2 commits into from
Dec 14, 2021
Merged

Conversation

roji
Copy link
Member

@roji roji commented Dec 11, 2021

One possible design question...

  • NRT nullability is computed in a convention, but not value type nullability; that's just hard-coded in Property.DefaultIsNullable.
    • We want NRT computation to be in a convention, since there's a NullabilityInfoContext which caches stuff for perf.
    • We could have a single convention setting IsRequired for both NRTs and value types (NullabilityInfoContext detects for those too), but this could possibly be heavier perf-wise. Also not sure it's worth it, /cc @AndriySvyryd.

Also see #26966 which was discovered as part of this.

Closes #24744

@roji roji requested a review from a team December 11, 2021 11:41
@AndriySvyryd
Copy link
Member

We could have a single convention setting IsRequired for both NRTs and value types (NullabilityInfoContext detects for those too), but this could possibly be heavier perf-wise. Also not sure it's worth it, /cc @AndriySvyryd.

I'll consider this as part of #214

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Switch to the standard reflection API for decoding nullability information
3 participants