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

Enable Nullable Reference Types #208

Closed
3 tasks done
askpt opened this issue Jan 24, 2024 · 0 comments · Fixed by #253
Closed
3 tasks done

Enable Nullable Reference Types #208

askpt opened this issue Jan 24, 2024 · 0 comments · Fixed by #253
Assignees
Labels
breaking-change Changes in exposed interfaces or behaviour enhancement New feature or request

Comments

@askpt
Copy link
Member

askpt commented Jan 24, 2024

Requirements

As part of C# 8.0, we have access to a Nullable Reference Types (NRT) feature. This allows the have a more explicit flow of nulls in the codebase.

The NRT feature holds you to a higher standard on how you deal with nulls, and as such it issues new warnings on existing code. So that those warnings (however useful) don’t break you, the feature must be explicitly enabled in your code before it starts complaining. Once you do that on existing code, you have work to do to make that code null-safe and satisfy the compiler that you did.

Check: https://devblogs.microsoft.com/dotnet/embracing-nullable-reference-types/

Possible breaking changes

This might bring some potential breaking changes for the providers and customers that consume our library. I think this should be released with a breaking change alert.

Notes

To ease the migration, the new code created can use a preprocessor directive. See https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives#nullable-context

Potential tasks

Tasks

@askpt askpt added the enhancement New feature or request label Jan 24, 2024
@askpt askpt added the breaking-change Changes in exposed interfaces or behaviour label Feb 12, 2024
@askpt askpt added this to the 2.0 (breaking) milestone Feb 21, 2024
@askpt askpt linked a pull request Mar 28, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Changes in exposed interfaces or behaviour enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants