question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve library with nullable reference types

See original GitHub issue

Nullable reference types (NRTs) were introduced in C# 8 to help developers understand their usage of null values throughout their code to avoid unexpected exceptions on edge cases or explicitly mark values as nullable if they are intended to be. More information can be found in the official Microsoft docs.

I feel like security critical libraries like this one could really benefit from implementing this feature for the following reasons:

  1. It would improve the library code itself by ensuring all possible null cases are accounted for (Ex: Adding null checks or making variables nullable).
    • This is important because even if the current code is null safe without this feature now, future code may introduce edge cases that aren’t caught. This feature could help prevent that from happening.
  2. Consumers of the library who also have the feature enabled will get the nullable signatures from this library to keep their code safer as well.

I would be very happy to attempt integrating this feature into the code if you support the idea.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
AndrewTriesToCodecommented, Feb 13, 2022

🎉 This issue has been resolved in version 6.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

1reaction
fossbrandoncommented, Jan 23, 2022

Yup! Thanks for reopening and sorry for the delay on this last one. I’m mostly done with it but life got pretty busy. I should have a PR within the next week though.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Update your codebase to use nullable reference types
Disabling nullable as the default works better if the library is stable, and the main focus of the development is to adopt nullable...
Read more >
Nullable Reference types in C# – Best practices
Nullable reference types in libraries. To fully benefit from nullable reference types, it's important that any class libraries referenced by ...
Read more >
Benefits of C# 8.0 nullable reference types when working ...
I'm currently in the process of updating an ASP.NET Core 2.1 project to .NET 5 and at the same time trying to take...
Read more >
Improved Analysis and Hints for Nullable Reference Types
This opens up an interesting opportunity to improve type hints. As you may already know, implicitly typed variables are now nullable by default, ......
Read more >
C# 10.0 improves handling of nullable references in ...
C# 10.0 improves handling of nullable references in generic types - no more AllowNull · The non-generic case · The generic case, before...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found