Enable nullable on NuGet.Protocol V3 search/list/autocomplete types - #7519
Merged
Merged
Conversation
nkolev92
marked this pull request as ready for review
July 6, 2026 20:03
…phase 21) Remove #nullable disable from phase 21 files and add honest nullable annotations: - ListResource: abstract methods with non-null params - AutoCompleteResource: abstract methods with non-null params - AutoCompleteResourceV3: nullable _environmentVariableReader, null-safe CatalogEntry?.Version access, (string?) for JObject version cast - PackageSearchResource: abstract SearchAsync with non-null params - RawSearchResourceV3: JObject? searchJson in loop - All V3 providers (AutoComplete, PackageSearch, RawSearch, V3FeedList): TryCreate returns INuGetResource?, use ?? throw pattern for HttpSourceResource - Update PublicAPI.Shipped.txt for both net472 and net8.0 (15 entries each) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
nkolev92
force-pushed
the
dev-nkolev92-nullableProtocolPhase21
branch
from
July 6, 2026 20:04
b46c114 to
a6adc12
Compare
jebriede
previously approved these changes
Jul 6, 2026
jebriede
left a comment
Contributor
There was a problem hiding this comment.
Approving with suggestion.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Member
Author
|
@jebriede @zivkan @Nigusu-Allehu ready for another look. |
nkolev92
enabled auto-merge (squash)
July 8, 2026 23:01
jebriede
approved these changes
Jul 9, 2026
Nigusu-Allehu
approved these changes
Jul 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Progress: NuGet/Home#14851
Description
Phase 21 of the NuGet.Protocol nullable migration: enable nullable on V3 search, list, and autocomplete resource types and their providers.
Notable decisions
CatalogEntry?.Version—CatalogEntryisPackageSearchMetadataRegistration?, so null-conditional is needed instead of!(string?)package["version"]in the Newtonsoft JObject path — added explicit null guard rather than suppression?? throw new InvalidOperationException(...)pattern forHttpSourceResource(matchingServiceIndexResourceV3ProviderandRepositorySignatureResourceProvider)PackageSearchResourceV3was already nullable-enabled — no changes neededPR Checklist