Skip to content

Enable nullable for NuGet.Protocol repository abstractions - #7406

Merged
nkolev92 merged 1 commit into
devfrom
dev-nkolev92-protocolNullablePhase12
May 28, 2026
Merged

nkolev92 merged 1 commit into
devfrom
dev-nkolev92-protocolNullablePhase12

Conversation

@nkolev92

@nkolev92 nkolev92 commented May 21, 2026 •

Copy link
Copy Markdown
Member

Bug

Progress: NuGet/Home#14851

Description

Enable nullable annotations for the Phase 12 NuGet.Protocol repository-abstraction batch.

  • SourceRepository.GetResource and GetResourceAsync now return nullable resources, matching the existing XML docs and the INuGetResourceProvider.TryCreate contract when a provider cannot produce a resource.
  • Annotate the repository/provider primitives (Repository, SourceRepository, ISourceRepositoryProvider, SourceRepositoryProvider, CachingSourceProvider, ProviderComparer, FeedTypePackageSource, HttpResponseMessageExtensions) and make the immediate callers/tests handle required resources explicitly.
  • DownloadResourceResult now reflects its existing optional stream/source/reader state in the public annotations.
  • PackageUpdateIO now treats a missing PackageMetadataResource as "no version candidate found" in both the latest-version and non-vulnerable-version lookup paths, rather than throwing.

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 marked this pull request as ready for review May 22, 2026 23:31
@nkolev92
nkolev92 requested a review from a team as a code owner May 22, 2026 23:31
@nkolev92
nkolev92 requested review from donnie-msft and jeffkl May 22, 2026 23:31
donnie-msft
donnie-msft previously approved these changes May 26, 2026
@nkolev92
nkolev92 dismissed stale reviews from donnie-msft and jeffkl via aaa8ff6 May 26, 2026 20:40
donnie-msft
donnie-msft previously approved these changes May 26, 2026
@nkolev92
nkolev92 requested a review from jeffkl May 26, 2026 20:44
@nkolev92
nkolev92 enabled auto-merge (squash) May 26, 2026 20:44
jeffkl
jeffkl previously approved these changes May 26, 2026
@nkolev92
nkolev92 dismissed stale reviews from donnie-msft and jeffkl via cc6e13e May 27, 2026 16:35
@nkolev92
nkolev92 force-pushed the dev-nkolev92-protocolNullablePhase12 branch from cc6e13e to 8a54f02 Compare May 27, 2026 16:36
@nkolev92
nkolev92 requested review from donnie-msft and jeffkl May 28, 2026 00:13
@nkolev92

Copy link
Copy Markdown
Member Author

I had to rebase @donnie-msft, @jeffkl

@nkolev92
nkolev92 merged commit ef16870 into dev May 28, 2026
17 of 18 checks passed
@nkolev92
nkolev92 deleted the dev-nkolev92-protocolNullablePhase12 branch May 28, 2026 00:43
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.

3 participants