Skip to content

Enable nullable for the final NuGet.Protocol metadata files - #7596

Merged
nkolev92 merged 3 commits into
devfrom
dev-nkolev92-nullableProtocolFinal
Jul 30, 2026
Merged

nkolev92 merged 3 commits into
devfrom
dev-nkolev92-nullableProtocolFinal

Conversation

@nkolev92

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14851

Description

Completes the NuGet.Protocol nullable-reference-types enablement. This is the final batch (phases 17, 18, 24): the last 16 #nullable disable files are annotated, bringing NuGet.Protocol to zero #nullable disable directives. The public metadata cascade (IPackageSearchMetadata and its implementations) is propagated through dependent projects, and PublicAPI.Shipped.txt is updated for both TFMs (oblivious ~ entries replaced in place).

Notable decision:

  • MetadataResourceV3 now throws InvalidDataException when a catalog entry is missing or has an unparseable version (a mandatory field), instead of silently dropping the entry — matching the malformed-data pattern already used by RegistrationResourceV3.

PR Checklist

  • Meaningful title, helpful description and a linked NuGet/Home issue
  • Added tests
  • Link to an issue or pull request to update docs if this PR changes settings, environment variables, new feature, etc.

nkolev92 and others added 2 commits July 26, 2026 12:43
Completes NuGet.Protocol nullable enablement (phases 17, 18, 24): the last
16 `#nullable disable` files are annotated, with the public metadata cascade
propagated across dependent projects and PublicAPI.Shipped.txt for both TFMs.

MetadataResourceV3 now throws InvalidDataException on a missing/unparseable
mandatory catalog version instead of silently dropping the entry.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: adcfe3e1-067b-4ef1-89e7-cd0e377c18b2
@nkolev92
nkolev92 force-pushed the dev-nkolev92-nullableProtocolFinal branch from c37c754 to 866cb1c Compare July 26, 2026 19:43
@nkolev92
nkolev92 marked this pull request as ready for review July 26, 2026 20:28
@nkolev92
nkolev92 requested a review from a team as a code owner July 26, 2026 20:28

@donnie-msft donnie-msft left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documented a couple assumptions I made.

@nkolev92
nkolev92 merged commit aea750d into dev Jul 30, 2026
17 of 18 checks passed
@nkolev92
nkolev92 deleted the dev-nkolev92-nullableProtocolFinal branch July 30, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add nullable annotations to NuGet.Protocol

2 participants