Resolve ILLink warnings on System.Private.DataContractSerialization Part 1; Json)#50619
Resolve ILLink warnings on System.Private.DataContractSerialization Part 1; Json)#506193 commits merged intodotnet:mainfrom
Conversation
|
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @tannergooding, @sbomer Issue DetailsThis is part 1 of resolving the warnings for System.Private.DataContractSerialization. It is covering all of the warnings from the Json side, the next step will be to cover the Xml side. Given the space is serialization, these changes mostly are about adding RequiresUnreferencedCode to all the stack that uses reflection to serialize/deserialize objects comming from the input. cc: @eerhardt @krwq @vitek-karas
|
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
As said above, the initial approach was to just mark everything as RequiredUnreferencedCode given the fact that this is a serializer, but due to the nature of DataContractSerialization and the fact that you have to always create the serializer passing in the expected types in the object graph, I'm checking to see if we can actually annotate this accordingly in order to make this serializer safe. I'll try a few things and update the PR if necessary |
eerhardt
left a comment
There was a problem hiding this comment.
Just one suggestion to factor the Delegate GetMethod("Invoke") out into a helper method. Once that is addressed this looks good.
|
Hello @joperezr! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This is part 1 of resolving the warnings for System.Private.DataContractSerialization. It is covering all of the warnings from the Json side, the next step will be to cover the Xml side.
Given the space is serialization, these changes mostly are about adding RequiresUnreferencedCode to all the stack that uses reflection to serialize/deserialize objects comming from the input.
cc: @eerhardt @krwq @vitek-karas