Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/6.0-rc2] XmlSerializer support for IsDynamicCodeSupported=false #59507

Merged
merged 5 commits into from
Sep 24, 2021

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 23, 2021

Backport of #59386 to release/6.0-rc2

/cc @eerhardt

Customer Impact

XmlSerializer doesn't work when running on iOS devices with the --enable-opt sealer linker optimization (that Xamarin iOS uses). This means any app using XmlSerializer that was working with legacy Xamarin.iOS will fail with upgraded to .NET 6.

Testing

I added a new trimming test that sets the "sealer" linker optimization and simulates being on a platform that doesn't allow JIT'ing. The existing unit tests also caught a bug in CanDeserialize in this mode, which I fixed.

Risk

Medium-low. There is a chance there are other bugs on iOS that weren't caught by the existing tests. The other risk is the bug fix to CanDeserialize when using SOAP. Even when not on iOS there is a slight change in behavior to always return true for SOAP deserialization.

The changes were ported from the runtimelab / NativeAOT branch, so there has been some usage of the changes there.

Add more checks to XmlSerializer to check the SerializationMode. Don't try to use Reflection.Emit if the SerializationMode is ReflectionOnly.

These changes were ported from
* dotnet/runtimelab#593
* dotnet/runtimelab#600

Fix #59167
@eerhardt
Copy link
Member

FYI - @marek-safar @rolfbjarne

@eerhardt eerhardt added the Servicing-consider Issue for next servicing release review label Sep 23, 2021
@Anipik Anipik added api-approved API was approved in API review, it can be implemented and removed Servicing-consider Issue for next servicing release review labels Sep 24, 2021
@Anipik
Copy link
Contributor

Anipik commented Sep 24, 2021

approved in email

@Anipik Anipik merged commit 67a48ec into release/6.0-rc2 Sep 24, 2021
@akoeplinger akoeplinger deleted the backport/pr-59386-to-release/6.0-rc2 branch October 7, 2021 18:38
@ghost ghost locked as resolved and limited conversation to collaborators Nov 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-approved API was approved in API review, it can be implemented area-Serialization
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants