未验证 提交 ca1b8408 编写于 作者: D dotnet-maestro[bot] 提交者: GitHub

[main] Update dependencies from dotnet/linker (#66538)

* Update dependencies from https://github.com/dotnet/linker build 20220311.3

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22160.1 -> To Version 7.0.100-1.22161.3

* Update dependencies from https://github.com/dotnet/linker build 20220314.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22160.1 -> To Version 7.0.100-1.22164.1

* Fix warnings introduced by new version of trim analyzer

In the case of Type.Helpers.cs better data flow analysis in the analyzer uncovers a warning. The method is used to implement reflection functionality and the warnings are not a problem and should be suppressed.

In the case of the System.Private.Xml Types.cs, the analyzer shows a real issue where the annotation is not enough for what the method does. This changed the annotation to All - which is already in place in all the callers anyway.

* Update dependencies from https://github.com/dotnet/linker build 20220318.5

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22160.1 -> To Version 7.0.100-1.22168.5

* Update dependencies from https://github.com/dotnet/linker build 20220318.6

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22160.1 -> To Version 7.0.100-1.22168.6

* Fix suppression for MakeGenericType of Nullable
Co-authored-by: Ndotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Nvitek-karas <10670590+vitek-karas@users.noreply.github.com>
Co-authored-by: NSven Boemer <sbomer@gmail.com>
上级 df01d020
......@@ -230,9 +230,9 @@
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>accf6fb6bf18f822fbbd227b1b4e31c65001a4ff</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.22160.1">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.22168.6">
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>5baeb5e08b4a5fd6995e6247c7cb41b673c5ecdc</Sha>
<Sha>5929598c16cd5d791eb33d4b5978f3140a136262</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="1.0.0-prerelease.22164.2">
<Uri>https://github.com/dotnet/xharness</Uri>
......
......@@ -169,7 +169,7 @@
<!-- Docs -->
<MicrosoftPrivateIntellisenseVersion>7.0.0-preview-20220316.2</MicrosoftPrivateIntellisenseVersion>
<!-- ILLink -->
<MicrosoftNETILLinkTasksVersion>7.0.100-1.22160.1</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkTasksVersion>7.0.100-1.22168.6</MicrosoftNETILLinkTasksVersion>
<MicrosoftNETILLinkAnalyzerPackageVersion>$(MicrosoftNETILLinkTasksVersion)</MicrosoftNETILLinkAnalyzerPackageVersion>
<!-- ICU -->
<MicrosoftNETCoreRuntimeICUTransportVersion>7.0.0-preview.3.22157.1</MicrosoftNETCoreRuntimeICUTransportVersion>
......
......@@ -366,10 +366,16 @@ public virtual bool IsAssignableFrom([NotNullWhen(true)] Type? c)
return false;
}
// IL2085 is produced due to the "this" of the method not being annotated and used in effectively this.GetInterfaces()
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2085:UnrecognizedReflectionPattern",
Justification = "The GetInterfaces technically requires all interfaces to be preserved" +
"But this method only compares the result against the passed in ifaceType." +
"So if ifaceType exists, then trimming should have kept it implemented on any type.")]
// IL2075 is produced due to the BaseType not returning annotated value and used in effectively this.BaseType.GetInterfaces()
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2075:UnrecognizedReflectionPattern",
Justification = "The GetInterfaces technically requires all interfaces to be preserved" +
"But this method only compares the result against the passed in ifaceType." +
"So if ifaceType exists, then trimming should have kept it implemented on any type.")]
internal bool ImplementInterface(Type ifaceType)
{
Type? t = this;
......
......@@ -728,6 +728,7 @@ private void InternalSerialize(MethodInfo methodInfo, LocalBuilder memberValue,
_ilg.Call(methodInfo);
}
[RequiresUnreferencedCode(DataContract.SerializerTrimmerWarning)]
private LocalBuilder UnwrapNullableObject(LocalBuilder memberValue)// Leaves !HasValue on stack
{
Type memberType = memberValue.LocalType;
......
......@@ -1196,12 +1196,13 @@ private static void PopulateMemberInfos(StructMapping structMapping, MemberMappi
}
}
// The DynamicallyAccessedMemberTypes.All annotation is required here because the method
// tries to access private members on base types (which is normally blocked by reflection)
// This doesn't make the requirements worse since the only callers already have the type
// annotated as All anyway.
private static bool ShouldBeReplaced(
MemberInfo memberInfoToBeReplaced,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicProperties
| DynamicallyAccessedMemberTypes.NonPublicProperties
| DynamicallyAccessedMemberTypes.PublicFields
| DynamicallyAccessedMemberTypes.NonPublicFields)] Type derivedType,
[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type derivedType,
out MemberInfo replacedInfo)
{
replacedInfo = memberInfoToBeReplaced;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册