Add nullable annotations
I've added nullable annotations to the main project. There was a lot to change so I might have missed something, but I've tried my best to track what should be nullable and what should be suppressed. I also switched from IsExternalInit to PolySharp because it has a lot more features, including attributes helpful here (MaybeNull).
I'll have to merge this into a branch for testing. It might not work for those who aren't using nullable notations. Or we might just have to add some additional #pragmas.
PolySharp looks interesting. Just need to make sure it doesn't create a downstream dependency (hence the private all for the other packages).
I see you've fallen for the CodeAnalysis.CSharp upgrade trap (as I have many times!). 4.8 is our limit for netstandard2.1 which is the requirement for source generators :( Unless something has changed (cause I'm not sure why it's so limited)
I'll have to merge this into a branch for testing. It might not work for those who aren't using nullable notations. Or we might just have to add some additional #pragmas.
PolySharp looks interesting. Just need to make sure it doesn't create a downstream dependency (hence the private all for the other packages).
I see you've fallen for the CodeAnalysis.CSharp upgrade trap (as I have many times!). 4.8 is our limit for netstandard2.1 which is the requirement for source generators :( Unless something has changed (cause I'm not sure why it's so limited)
Huh, that's interesting. I assume you mean netstandard2.0. It seems like it supports netstandard2.0 to me: https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp
If I'm missing something, you can pin versions in your .csproj by using square brackets (e.g. [1.0.0]) which will prevent your IDE from telling you to upgrade. You might want to do this with FluentAssertions as well by the way, which recently changed to a terrible license.
The official Godot NuGet package uses nullable annotations so there should be no issue here.
Huh, that's interesting. I assume you mean netstandard2.0. It seems like it supports netstandard2.0 to me: https://www.nuget.org/packages/Microsoft.CodeAnalysis.CSharp If I'm missing something, you can pin versions in your .csproj by using square brackets (e.g.
[1.0.0]) which will prevent your IDE from telling you to upgrade. You might want to do this with FluentAssertions as well by the way, which recently changed to a terrible license.
Yep, 2.0 :) But I remember now, CSharp lib is tied to .NET version and we're limited for backwards compatibility with Godot 3. I'll be dropping support for Godot 3 in the next major version. No plans for that as yet, but it's on the cards.
The official Godot NuGet package uses nullable annotations so there should be no issue here.
Ok, great :)
Oh, and thanks for the FluentAssertions/pin version tip. Very handy :)
Hey Joy-less. Definitely appreciate your work on this, but I'm going to close this PR and stick with non-NRT if that's ok.