-
Notifications
You must be signed in to change notification settings - Fork 200
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
Make XmlSerializer work with NativeAOT #593
Make XmlSerializer work with NativeAOT #593
Conversation
Force the reflection-only code paths that don't Reflection.Emit.
|
||
if (Mode == SerializationMode.ReflectionOnly) | ||
{ | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to also execute GetTopLevelMapping
at the very bottom of the method in ReflectionOnly mode?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{ | ||
return; | ||
} | ||
|
||
_tempAssembly = s_cache[defaultNamespace, type]; | ||
if (_tempAssembly == null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to fix XmlSerializer(XmlTypeMapping xmlTypeMapping)
constructor in the same way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Welp, I haven't done a full audit of what were all of the deleted ifdefs doing. This is more of an emergency fix to see what else the partner team is going to hit. We could file an issue to do a full audit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 dotnet#59167
* XmlSerializer support for IsDynamicCodeSupported=false 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 * Fix a bug in XmlSerializer.CanDeserialize when in ReflectionOnly mode. * Port UAP code for CanDeserialize * PR feedback * Add a linker test to ensure linker option '--enable-opt sealer' works when IsDynamicCodeSupported==false.
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
…lse (#59507) * XmlSerializer support for IsDynamicCodeSupported=false 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 * Fix a bug in XmlSerializer.CanDeserialize when in ReflectionOnly mode. * Port UAP code for CanDeserialize * PR feedback * Add a linker test to ensure linker option '--enable-opt sealer' works when IsDynamicCodeSupported==false. Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
Force the reflection-only code paths that don't Reflection.Emit.