Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[main] Update dependencies from dotnet/linker (#73894)
* Update dependencies from https://github.com/dotnet/linker build 20220812.4 Microsoft.NET.ILLink.Tasks From Version 7.0.100-1.22412.3 -> To Version 7.0.100-1.22412.4 * `System.Runtime.Serialization.Json.ReflectionOnly.Tests` - fix linker .. errors. ``` [22:32:27] fail: [FAIL] DataContractJsonSerializerTests.DCJS_VerifyDateTimeForFormatStringDCJsonSerSettings [22:32:27] info: System.InvalidOperationException : No set method for property 'UtcDateTime' in type 'System.Runtime.Serialization.DateTimeOffsetAdapter'. [22:32:27] info: at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) [22:32:27] info: at DataContractJsonSerializerTests.SerializeAndDeserialize[DateTimeOffset](DateTimeOffset value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) [22:32:27] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) [22:32:27] fail: [FAIL] DataContractJsonSerializerTests.DCJS_ClassWithDatetimeOffsetTypeProperty [22:32:27] info: System.InvalidOperationException : No set method for property 'UtcDateTime' in type 'System.Runtime.Serialization.DateTimeOffsetAdapter'. [22:32:27] info: at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) [22:32:27] info: at DataContractJsonSerializerTests.SerializeAndDeserialize[TypeWithDateTimeOffsetTypeProperty](TypeWithDateTimeOffsetTypeProperty value, String baseline, DataContractJsonSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) [22:32:27] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) ``` * [wasm] System.Runtime.Serialization.Schema.Tests - fix linker errors ``` fail: [FAIL] System.Runtime.Serialization.Schema.Tests.ImporterTests.Import(import: Action`1 { Method = Void <Import_MemberData>b__7(System.Runtime.S erialization.XsdDataContractImporter), Target = <>c__DisplayClass7_1 { schemaSet = XmlSchemaSet { ... }, typeName = http://schemas.datacontract.org/200 4/07/System.Runtime.Serialization.Schema.Tests:ImporterTests.SerializableFormatClass } }, codeLength: -1) info: System.MissingMethodException : No parameterless constructor defined for type 'Microsoft.CSharp.CSharpCodeProvider'. info: at System.RuntimeType.CreateInstanceMono(Boolean , Boolean ) info: at System.RuntimeType.CreateInstanceDefaultCtor(Boolean , Boolean ) info: at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions) info: at System.Activator.CreateInstance(Type type, Boolean nonPublic) info: at System.Activator.CreateInstance(Type type) info: at System.CodeDom.Compiler.CompilerInfo.CreateProvider() info: at System.CodeDom.Compiler.CodeDomProvider.CreateProvider(String ) info: at System.Runtime.Serialization.Schema.Tests.SchemaUtils.DumpCode(CodeCompileUnit ccu, CodeDomProvider provider) info: at System.Runtime.Serialization.Schema.Tests.ImporterTests.Import(Action`1 import, Int32 codeLength) info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) ``` * [wasm] System.Runtime.Serialization.Xml.ReflectionOnly.Tests - fix .. linker errors. ``` [02:47:16] fail: [FAIL] DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter [02:47:16] info: System.Runtime.Serialization.InvalidDataContractException : No get method for property 'Capacity' in type 'System.Runtime.Serialization.MemoryStreamAdapter'. [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.ThrowInvalidDataContractException(String , Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.ThrowInvalidDataContractException(String ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper.ImportDataMembers() [02:47:16] info: at System.Runtime.Serialization.DataContracts.ClassDataContract.ClassDataContractCriticalHelper..ctor(Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.ClassDataContract..ctor(Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.CreateDataContract(Int32 , RuntimeTypeHandle , Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.DataContractCriticalHelper.GetDataContractSkipValidation(Int32 , RuntimeTypeHandle , Type ) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.GetDataContractSkipValidation(Int32 id, RuntimeTypeHandle typeHandle, Type type) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(RuntimeTypeHandle typeHandle, Type type) [02:47:16] info: at System.Runtime.Serialization.DataContracts.DataContract.GetDataContract(Type type) [02:47:16] info: at System.Runtime.Serialization.DataContractSerializer.get_RootContract() [02:47:16] info: at System.Runtime.Serialization.DataContractSerializer.InternalWriteStartObject(XmlWriterDelegator writer, Object graph) [02:47:16] info: at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(XmlDictionaryWriter , Object ) [02:47:16] info: at System.Runtime.Serialization.XmlObjectSerializer.WriteObject(Stream , Object ) [02:47:16] info: at System.Runtime.Serialization.Tests.DataContractSerializerHelper.SerializeAndDeserialize[MemoryStream](MemoryStream value, String baseline, DataContractSerializerSettings settings, Func`1 serializerFactory, Boolean skipStringCompare) [02:47:16] info: at DataContractSerializerTests.<DCS_MemoryStream_Serialize_UsesBuiltInAdapter>g__ValidateObject|240_0(MemoryStream original, String expectedXml, Byte[] expectedData, Int32 expectedPosition, Boolean expectedExposable) [02:47:16] info: at DataContractSerializerTests.DCS_MemoryStream_Serialize_UsesBuiltInAdapter() [02:47:16] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) ``` * Fix linker errors - System.Xml.XmlSerializer.ReflectionOnly.Tests ``` [02:47:21] fail: [FAIL] XmlSerializerTests.Xml_ImmutableCollections(type: typeof(System.Collections.Immutable.ImmutableArray<int>), collection: [42], createException: null, addException: typeof(System.InvalidOperationException), expectedXml: "<?xml version=\"1.0\" encoding=\"utf-8\"?><ArrayOf"..., exMsg: "Specified method is not supported.") [02:47:21] info: System.InvalidOperationException : There was an error generating the XML document. [02:47:21] info: ---- System.InvalidOperationException : To be XML serializable, types which inherit from ICollection must have an implementation of Add(System.Int32) at all levels of their inheritance hierarchy. System.Collections.Immutable.ImmutableArray`1[[System.Int32, System.Private.CoreLib, Version=7.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] does not implement Add(System.Int32). [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(Stream stream, Object o, XmlSerializerNamespaces namespaces) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(Stream stream, Object o) [02:47:21] info: at XmlSerializerTests.Serialize[Object](Object value, String baseline, Func`1 serializerFactory, Boolean skipStringCompare, XmlSerializerNamespaces xns) [02:47:21] info: at XmlSerializerTests.Xml_ImmutableCollections(Type type, Object collection, Type createException, Type addException, String expectedXml, String exMsg) [02:47:21] info: at System.Reflection.MethodInvoker.InterpretedInvoke(Object , Span`1 , BindingFlags ) [02:47:21] info: ----- Inner Stack Trace ----- [02:47:21] info: at System.Xml.Serialization.TypeScope.GetDefaultIndexer(Type , String ) [02:47:21] info: at System.Xml.Serialization.TypeScope.GetCollectionElementType(Type , String ) [02:47:21] info: at System.Xml.Serialization.TypeScope.ImportTypeDesc(Type , MemberInfo , Boolean ) [02:47:21] info: at System.Xml.Serialization.TypeScope.GetTypeDesc(Type , MemberInfo , Boolean , Boolean ) [02:47:21] info: at System.Xml.Serialization.TypeScope.GetTypeDesc(Type , MemberInfo , Boolean ) [02:47:21] info: at System.Xml.Serialization.ModelScope.GetTypeModel(Type , Boolean ) [02:47:21] info: at System.Xml.Serialization.ModelScope.GetTypeModel(Type ) [02:47:21] info: at System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type , XmlRootAttribute , String ) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.GenerateXmlTypeMapping(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.GetMapping() [02:47:21] info: at System.Xml.Serialization.XmlSerializer.SerializeUsingReflection(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) [02:47:21] info: at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id) ``` * [wasm] Fix trimming errors in event-pipe sample `IL2121` was disabled for samples, but the project discard the value of `$(NoWarn)`, thus missing the warning code. ``` ILLink : Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource: Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2113'. Consi der removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] ILLink : Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource: Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2115'. Consi der removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(885,9): Trim analysis error IL2121: System.Diagn ostics.Tracing.EventSource.WriteEvent(Int32, Int64, Int64, Int64): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removi ng the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1067,9): Trim analysis error IL2121: System.Diag nostics.Tracing.EventSource.WriteEvent(Int32, Int32, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing th e unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(955,9): Trim analysis error IL2121: System.Diagn ostics.Tracing.EventSource.WriteEvent(Int32, String, String, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider rem oving the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(927,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, String, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(796,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, Int32): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1366,13): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, Object[]): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(904,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEvent(Int32, String): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1236,13): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEventCore(Int32, Int32, EventData*): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1959,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEventVarargs(Int32, Guid*, Object[]): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sample.csproj] /workspaces/runtime/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Tracing/EventSource.cs(1350,9): Trim analysis error IL2121: System.Diagnostics.Tracing.EventSource.WriteEventWithRelatedActivityIdCore(Int32, Guid*, Int32, EventData*): Unused 'UnconditionalSuppressMessageAttribute' for warning 'IL2112'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sa mple.csproj] ILLink : Trim analysis error IL2121: System.Resources.ResourceReader.DeserializeObject(Int32): Unused 'UnconditionalSuppressMessageAttribute' for warni ng 'IL2026'. Consider removing the unused warning suppression. [/workspaces/runtime/src/mono/sample/wasm/browser-eventpipe/Wasm.Browser.EventPipe.Sampl e.csproj] ``` Fixes #73933 . * [wasm] Disable tests failing with trimming Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com> Co-authored-by: Ankit Jain <radical@gmail.com>
- Loading branch information