Skip to content

Remove suppression and Fix trim warnings - #7488

Merged
Nigusu-Allehu merged 4 commits into
devfrom
dev-nyenework-update-nsj-version
Jun 19, 2026
Merged

Nigusu-Allehu merged 4 commits into
devfrom
dev-nyenework-update-nsj-version

Conversation

@Nigusu-Allehu

@Nigusu-Allehu Nigusu-Allehu commented Jun 17, 2026 •

Copy link
Copy Markdown
Member

Bug

Fixes: #7453 (comment)

Description

The Newtonsoft.Json version upgrade exposed IL2026/IL3050 trimming/AOT warnings because the newer version annotates JsonConvert.DeserializeObject<T>() with [RequiresUnreferencedCode]/[RequiresDynamicCode]. Rather than cascading these attributes up the entire credential service call chain, this PR replaces the NSJ call in PluginCredentialProvider with System.Text.Json source-generated deserialization, eliminating the warnings at the source.

Unlike the dual NSJ/STJ code paths behind a feature switch in NuGet.Protocol, I don't see a reason to be that careful here PluginCredentialResponse is a trivial 4-property POCO with no custom converters or polymorphism, and I've added parity tests that deserialize the same inputs with both NSJ and STJ and assert equal results.

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.

Loading
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