Skip to content

NuGet.Packaging nullability - Signing APIs - #7219

Merged
nkolev92 merged 13 commits into
devfrom
dev-nkolev92-packaging-signingNullability
Mar 24, 2026
Merged

nkolev92 merged 13 commits into
devfrom
dev-nkolev92-packaging-signingNullability

Conversation

@nkolev92

@nkolev92 nkolev92 commented Mar 18, 2026 •

Copy link
Copy Markdown
Member

Bug

Fixes: NuGet/Home#14778

Description

Last part of the NuGet.Packaging nullability enablement.
The below is a list of notable decisions and pointers for review.

  • A bunch of the types were validating nulls already, so the changes are straightforward.
  • SignedPackageArchiveMetadata all its properties were made required since the only place where it's created they are all set. If we don't set them, then we end up needing to null annotate some things that code is not really ready to handle. API breaking change, but not an ABI one.
    • This pattern was followed in a couple of private types as well, but there the change is simpler.
  • Note that overall, this is a large changeset, but to me it seems simpler in it's changes than others because there were there was reasonable amount of null checking already. There are some places where we are making assumptions that are simply hard to validate via the compiler, so plenty of places where we are ignoring the null warning with !.
    Final thing, this is fairly isolated. Even if we are suppressing SignedCms warnings for nullability for example, it doesn't necessarily bleed into other code.

Note - I worked with copilot in a single session, so I worked with it to actually generate instructions to help it do things more independently in future work. I was debating adding a skill, but I think making it generic would be pretty hard so we'll just keep this in our repo instructions for now.

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 nkolev92 changed the title NuGet.Packaging nullability NuGet.Packaging nullability - Signing APIs Mar 18, 2026
@nkolev92
nkolev92 force-pushed the dev-nkolev92-packaging-signingNullability branch from a60bf50 to d394af7 Compare March 18, 2026 19:31
@nkolev92
nkolev92 marked this pull request as ready for review March 20, 2026 18:46
@nkolev92
nkolev92 requested a review from a team as a code owner March 20, 2026 18:46
@nkolev92
nkolev92 merged commit cfc4937 into dev Mar 24, 2026
16 checks passed
@nkolev92
nkolev92 deleted the dev-nkolev92-packaging-signingNullability branch March 24, 2026 21:25
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.Packaging

2 participants