Nullable reference types
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
I annotated the public API in https://github.com/StackExchange/Dapper/pull/1392I for fun and in case it could be helpful. I don't have a use case for this feature as a Dapper user right now, and I'm not asking for it.
@NickCraver had good thoughts and asked me to open an issue for discussion. There are some big drawbacks:
- It would hose pretty much all open PRs.
- Fixing the new warnings results in a big change to review. (Flip side: there are definitely bugs that got caught.)
- Using C# 8 with any target framework other than .NET Core 3+ is officially unsupported by Microsoft, even though they tell library authors to use this unsupported configuration for the purpose of NRT annotation.
- If I'm paraphrasing correctly, Nick is concerned that enabling NRTs could make it easier for nulls to leak in or out of Dapper APIs in places where they are currently supposed to never be null.
Is there anything that Dapper would stand to gain by paying these costs?
📝 https://github.com/tunnelvisionlabs/ReferenceAssemblyAnnotator aims to fill the tooling gap by copying nullability annotations from .NET Core 3+ into the reference assemblies you compile against and by providing internal nullability attributes as source. I use it for active projects from net35 to net48 and netstandard2.0. There aren't any technical limitations I know of compared to the NRT experience on .NET Core 3 itself. (Besides bugs in this community tool, of course.)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing pull request #1392 and the discussion about C# 8 nullable reference types, target-framework support, compatibility, and warning cleanup. Done would require an agreed decision on whether and how Dapper should adopt nullable annotations, rather than a narrowly scoped code change.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100