Skip to content

Conversation

MichalStrehovsky
Copy link
Member

These are all incompatible with trimming and break native AOT outerloop runs. E.g.

[FAIL] System.Runtime.Serialization.Xml.Canonicalization.Tests.XmlCanonicalizationTest.TestC14NInclusivePrefixes
System.TypeInitializationException : A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
---- System.InvalidOperationException : There is an error in XML document (0, 0).
-------- System.InvalidOperationException : There was an error reflecting type 'TestCasesConfig'.
------------ System.InvalidOperationException : You must implement a default accessor on System.Collections.Generic.List`1[[TestCase, System.Runtime.Serialization.Xml.Canonicalization.Tests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]] because it inherits from ICollection.
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x16c
   at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnNonGCStaticBase(StaticClassConstructionContext*, IntPtr) + 0x14
   at System.Runtime.Serialization.Xml.Canonicalization.Tests.XmlCanonicalizationTest.TestC14NInclusivePrefixes() + 0x80c
   at System.Runtime.Serialization.Xml.Canonicalization!<BaseAddress>+0x720cdc
   at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0x114
----- Inner Stack Trace -----
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader, String, XmlDeserializationEvents) + 0x1f8
   at System.Xml.Serialization.XmlSerializer.Deserialize(Stream) + 0x9c
   at TestConfigHelper.LoadAllTests(String path) + 0x78
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xbc
----- Inner Stack Trace -----
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel, String, XmlReflectionImporter.ImportContext, String, XmlAttributes, Boolean, Boolean, RecursionLimiter) + 0x59c
   at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel, XmlRootAttribute, String, RecursionLimiter) + 0xa0
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type, XmlRootAttribute, String) + 0x8c
   at System.Xml.Serialization.XmlSerializer.GetMapping() + 0x58
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader, String, XmlDeserializationEvents) + 0x6c
----- Inner Stack Trace -----
   at System.Xml.Serialization.TypeScope.GetDefaultIndexer(Type, String) + 0x284
   at System.Xml.Serialization.TypeScope.ImportTypeDesc(Type, MemberInfo, Boolean) + 0x66c
   at System.Xml.Serialization.TypeScope.GetTypeDesc(Type, MemberInfo, Boolean, Boolean) + 0x100
   at System.Xml.Serialization.StructModel.GetFieldModel(FieldInfo) + 0x78
   at System.Xml.Serialization.StructModel.GetFieldModel(MemberInfo) + 0x68
   at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping, StructModel, Boolean, String, RecursionLimiter) + 0x5d4
   at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel, String, Boolean, XmlAttributes, RecursionLimiter) + 0x228
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel, String, XmlReflectionImporter.ImportContext, String, XmlAttributes, Boolean, Boolean, RecursionLimiter) + 0x218

Cc @dotnet/ilc-contrib

These are all incompatible with trimming and break native AOT outerloop runs. E.g.

```
[FAIL] System.Runtime.Serialization.Xml.Canonicalization.Tests.XmlCanonicalizationTest.TestC14NInclusivePrefixes
System.TypeInitializationException : A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
---- System.InvalidOperationException : There is an error in XML document (0, 0).
-------- System.InvalidOperationException : There was an error reflecting type 'TestCasesConfig'.
------------ System.InvalidOperationException : You must implement a default accessor on System.Collections.Generic.List`1[[TestCase, System.Runtime.Serialization.Xml.Canonicalization.Tests, Version=10.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51]] because it inherits from ICollection.
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x16c
   at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnNonGCStaticBase(StaticClassConstructionContext*, IntPtr) + 0x14
   at System.Runtime.Serialization.Xml.Canonicalization.Tests.XmlCanonicalizationTest.TestC14NInclusivePrefixes() + 0x80c
   at System.Runtime.Serialization.Xml.Canonicalization!<BaseAddress>+0x720cdc
   at System.Reflection.DynamicInvokeInfo.Invoke(Object, IntPtr, Object[], BinderBundle, Boolean) + 0x114
----- Inner Stack Trace -----
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader, String, XmlDeserializationEvents) + 0x1f8
   at System.Xml.Serialization.XmlSerializer.Deserialize(Stream) + 0x9c
   at TestConfigHelper.LoadAllTests(String path) + 0x78
   at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0xbc
----- Inner Stack Trace -----
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel, String, XmlReflectionImporter.ImportContext, String, XmlAttributes, Boolean, Boolean, RecursionLimiter) + 0x59c
   at System.Xml.Serialization.XmlReflectionImporter.ImportElement(TypeModel, XmlRootAttribute, String, RecursionLimiter) + 0xa0
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type, XmlRootAttribute, String) + 0x8c
   at System.Xml.Serialization.XmlSerializer.GetMapping() + 0x58
   at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader, String, XmlDeserializationEvents) + 0x6c
----- Inner Stack Trace -----
   at System.Xml.Serialization.TypeScope.GetDefaultIndexer(Type, String) + 0x284
   at System.Xml.Serialization.TypeScope.ImportTypeDesc(Type, MemberInfo, Boolean) + 0x66c
   at System.Xml.Serialization.TypeScope.GetTypeDesc(Type, MemberInfo, Boolean, Boolean) + 0x100
   at System.Xml.Serialization.StructModel.GetFieldModel(FieldInfo) + 0x78
   at System.Xml.Serialization.StructModel.GetFieldModel(MemberInfo) + 0x68
   at System.Xml.Serialization.XmlReflectionImporter.InitializeStructMembers(StructMapping, StructModel, Boolean, String, RecursionLimiter) + 0x5d4
   at System.Xml.Serialization.XmlReflectionImporter.ImportStructLikeMapping(StructModel, String, Boolean, XmlAttributes, RecursionLimiter) + 0x228
   at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(TypeModel, String, XmlReflectionImporter.ImportContext, String, XmlAttributes, Boolean, Boolean, RecursionLimiter) + 0x218
```
@MichalStrehovsky
Copy link
Member Author

/azp run runtime-nativeaot-outerloop

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@MichalStrehovsky
Copy link
Member Author

/ba-g the change is not exercised by the CI and need to unblock outerloops

@MichalStrehovsky MichalStrehovsky merged commit 315dbcf into main Aug 13, 2025
12 of 16 checks passed
@MichalStrehovsky MichalStrehovsky deleted the MichalStrehovsky-patch-2 branch August 13, 2025 21:15
@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants