Skip to content

Developers benefit from nullable annotations throughout all netcoreapp and Windows Compat Pack libraries #41720

Open

Description

Across .NET Core 3.0 and .NET 5.0, we annotated 94% of the netcoreapp assemblies for nullable reference types. In .NET 6.0/.NET 7.0, we plan to annotate the remaining 6% of that surface area and continue through other assemblies built from the dotnet/runtime repo.

This issue represents the assemblies previously tracked in #2339 that did not get completed in .NET 5.0. Following the same practices we used in .NET 5.0, we will:

  • Submit individual PRs, one for each assembly. Each PR should include changes to both the src and the ref. Each PR should contain only changes related to the nullable annotations/attributes, no other changes.
  • PRs can be merged once the annotations have been appropriately reviewed in PR.
  • Group all of the nullable annotation changes together in Changes to Nullable Reference Type Annotations in .NET 6.0 docs#21202

In .NET 5.0, as was tracked in #2339, we completed groups 1-8, most of group 9, all of group 10, and some items in groups 11 and 12

Planned for .NET 6.0

Group 9

Group 11 (not part of netcoreapp but reference netcoreapp)

Stretch Goal for .NET 6, or Carry Over to .NET 7.0

Group 12 (built from dotnet/runtime but not in netcoreapp and reference netstandard)

With netstandard not annotated, we will need to be cognizant of the fact that all dependencies will be viewed as oblivious:

  • System.CodeDom => netstandard
  • System.ComponentModel.Composition.Registration => netstandard, System.Reflection.Context
  • System.Composition.AttributedModel => netstandard
  • System.Composition.Convention => netstandard, System.Composition.AttributedModel
  • System.Composition.Hosting => netstandard, System.Composition.Runtime
  • System.Composition.Runtime => netstandard
  • System.Composition.TypedParts => netstandard, System.Composition.Runtime, System.Composition.AttributedModel, System.Composition.Hosting
  • System.Configuration.ConfigurationManager => netstandard, System.Security.Cryptography.ProtectedData
  • System.Diagnostics.PerformanceCounter => System.Configuration.ConfigurationManager
  • System.DirectoryServices.AccountManagement => System.Configuration.ConfigurationManager
  • System.IO.Ports => netstandard
  • System.Management => System.CodeDom
  • System.Runtime.Caching => netstandard, System.Configuration.ConfigurationManager
  • System.Security.Cryptography.Xml => netstandard
  • System.ServiceModel.Syndication => netstandard

Lastly

  • Remove #nullable enable from individual files after all dependent projects annotated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Team:LibrariesUser StoryA single user-facing feature. Can be grouped under an epic.area-MetatrackingThis issue is tracking the completion of other related issues.

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions