Skip to content

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

Merged
Anipik merged 5 commits into
release/6.0-rc2from
backport/pr-59386-to-release/6.0-rc2
Sep 24, 2021
Merged

[release/6.0-rc2] XmlSerializer support for IsDynamicCodeSupported=false#59507
Anipik merged 5 commits into
release/6.0-rc2from
backport/pr-59386-to-release/6.0-rc2

Conversation

@github-actions

@github-actionsgithub-actionsBot commented Sep 23, 2021

Copy link
Copy Markdown
Contributor

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#600Fix#59167
@eerhardt

Copy link
Copy Markdown
Member

FYI - @marek-safar@rolfbjarne

@eerhardteerhardt added the Servicing-consider Issue for next servicing release review label Sep 23, 2021
@runfoapprunfoappBot mentioned this pull request Sep 24, 2021
@AnipikAnipik 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
Copy Markdown
Contributor

approved in email

@Anipik
Anipik merged commit 67a48ec into release/6.0-rc2Sep 24, 2021
@akoeplinger
akoeplinger deleted the backport/pr-59386-to-release/6.0-rc2 branch October 7, 2021 18:38
@ghostghost locked as resolved and limited conversation to collaborators Nov 6, 2021
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api-approvedAPI was approved in API review, it can be implementedarea-Serialization

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@eerhardt@Anipik@StephenMolloy