Skip to content

AOT compatible: enable in NuGet.Protocol #7193

Merged
Nigusu-Allehu merged 10 commits intodevfrom
dev-nyenework-nuget.protocol-AOT
Mar 16, 2026
Merged

AOT compatible: enable in NuGet.Protocol #7193
Nigusu-Allehu merged 10 commits intodevfrom
dev-nyenework-nuget.protocol-AOT

Conversation

@Nigusu-Allehu
Copy link
Member

@Nigusu-Allehu Nigusu-Allehu commented Mar 6, 2026

Bug

Fixes: NuGet/Home#14792
Related: NuGet/Home#14408

Description

Enables AOT compatibility in NuGet.Protocol

Types that need string deduplication now
implement CacheStrings(MetadataReferenceCache cache) directly instead of relying on runtime property discovery

Changes

  • PackageSearchMetadata and ClonedPackageSearchMetadata implement CacheString method for caching.
  • Removed dead metadataCache.GetObject() call in LocalPackageMetadataResource (was a no-op LocalPackageSearchMetadata has no settable string properties)
  • GetObject<T>() is retained as a no-op for API compatibility. String caching is now done directly by the two classes above.

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.

@Nigusu-Allehu Nigusu-Allehu self-assigned this Mar 6, 2026
@Nigusu-Allehu Nigusu-Allehu force-pushed the dev-nyenework-nuget.protocol-AOT branch from b293b21 to edd963d Compare March 6, 2026 18:44
@Nigusu-Allehu Nigusu-Allehu changed the title AOT compatible: enable in NuGet.Protocol [Breaking] AOT compatible: enable in NuGet.Protocol Mar 6, 2026
@Nigusu-Allehu Nigusu-Allehu marked this pull request as ready for review March 6, 2026 22:18
@Nigusu-Allehu Nigusu-Allehu requested a review from a team as a code owner March 6, 2026 22:18
@Nigusu-Allehu Nigusu-Allehu requested review from nkolev92 and zivkan March 6, 2026 22:18
@Nigusu-Allehu Nigusu-Allehu changed the title [Breaking] AOT compatible: enable in NuGet.Protocol AOT compatible: enable in NuGet.Protocol Mar 9, 2026
@Nigusu-Allehu Nigusu-Allehu requested a review from zivkan March 9, 2026 23:43
jeffkl
jeffkl previously approved these changes Mar 10, 2026
@Nigusu-Allehu Nigusu-Allehu force-pushed the dev-nyenework-nuget.protocol-AOT branch from 9c5cb50 to 0694817 Compare March 12, 2026 23:39
@Nigusu-Allehu Nigusu-Allehu requested a review from jeffkl March 13, 2026 22:20
@Nigusu-Allehu Nigusu-Allehu merged commit 21c6db6 into dev Mar 16, 2026
17 of 18 checks passed
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.

Update MetadataReferenceCache to stop using reflection

4 participants