Repository navigation
Remove suppression and Fix trim warnings - #7488
Merged
Merged
Conversation
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
Fixes: #7453 (comment)
Description
The
Newtonsoft.Jsonversion upgrade exposedIL2026/IL3050trimming/AOT warnings because the newer version annotatesJsonConvert.DeserializeObject<T>()with[RequiresUnreferencedCode]/[RequiresDynamicCode]. Rather than cascading these attributes up the entire credential service call chain, this PR replaces the NSJ call inPluginCredentialProviderwithSystem.Text.Jsonsource-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 herePluginCredentialResponseis 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