Clean up #nullable in source - #72568
Conversation
|
Tagging subscribers to this area: @dotnet/area-meta Issue DetailsWe had dozens of uses of This also now defaults test projects to
|
We had dozens of uses of `#nullable disable` left in source in places we shouldn't have, resulting in lack of annotation in sources we'd declared NRT-enabled. We also had dozens of use of `#nullable enable` in source it shouldn't have been in, resulting in us actually shipping public annotations in code we didn't fully review for that purpose (e.g. some types in CodeDom). This cleans all of that up, removing unnecessary #nullables in the source. This also now defaults test projects to `<Nullable>annotations</Nullable>`. Test projects often include annotated files shared with product source, and while we generally don't require test projects be NRT-enabled, they can be tolerant of the annotations; we don't ship them, so we don't need to be concerned about what annotations show up on public types in test assemblies.
7f82659 to
426073b
Compare
We had dozens of uses of
#nullable disableleft in source in places we shouldn't have, resulting in lack of annotation in sources we'd declared NRT-enabled. We also had dozens of use of#nullable enablein source it shouldn't have been in, resulting in us actually shipping public annotations in code we didn't fully review for that purpose (e.g. some types in CodeDom). This cleans all of that up, removing unnecessary #nullables in the source.This also now defaults test projects to
<Nullable>annotations</Nullable>. Test projects often include annotated files shared with product source, and while we generally don't require test projects be NRT-enabled, they can be tolerant of the annotations; we don't ship them, so we don't need to be concerned about what annotations show up on public types in test assemblies.