dotnet / Scaffolding

Code generators to speed up development.
MIT License
638 stars 229 forks source link

Invert nullable default #2739

Closed tlmii closed 5 months ago

tlmii commented 5 months ago

Related to #2732

Previously the default for <Nullable> in the repo was not specified (thus making it disable). This meant that each time we added a new project we needed to remember to add <Nullable>enable</Nullable> to it, even though that really should be the default.

This PR inverts the default, setting <Nullable>enable</Nullable> at the root in D.B.props, removing the same from any existing projects that have it and adding <Nullable>disable</Nullable> to any projects that require code changes.

I intentionally did not make any code changes here to keep this PR clean (since it already touched a lot of files) even though some projects likely required minimal changes to support nullable types.

Note that I intentionally did not try to use deeper D.B.props files even when all or most of the projects within a subfolder needed nullable types disabled. This will make it easier for us to know how many projects are left and keep the changes isolated to one project at a time as we go through and do it.

I also dropped a few <LangVersion>latest</LangVersion> that snuck in via #2737 since that was in flight already when I did #2736