Skip to content
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

[main] Update dependencies from dotnet/linker #66538

Merged
merged 6 commits into from
Mar 21, 2022

Conversation

dotnet-maestro[bot]
Copy link
Contributor

@dotnet-maestro dotnet-maestro bot commented Mar 12, 2022

This pull request updates the following dependencies

From https://github.com/dotnet/linker

  • Subscription: 0d6d6ae4-f71f-4395-53e6-08d8e409d87d
  • Build: 20220318.6
  • Date Produced: March 19, 2022 1:06:17 AM UTC
  • Commit: 5929598c16cd5d791eb33d4b5978f3140a136262
  • Branch: refs/heads/main

…311.3

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22160.1 -> To Version 7.0.100-1.22161.3
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-codeflow for labeling automated codeflow label Mar 12, 2022
…314.1

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22160.1 -> To Version 7.0.100-1.22164.1
@akoeplinger
Copy link
Member

@vitek-karas is this is an expected error now after dotnet/linker#2681?

/Users/runner/work/1/s/src/libraries/System.Private.CoreLib/src/System/Type.Helpers.cs(378,37): error IL2075: 'this' argument does not satisfy 'DynamicallyAccessedMemberTypes.Interfaces' in call to 'System.Type.GetInterfaces()'. The return value of method 'System.Type.BaseType.get' does not have matching annotations. The source value must declare at least the same requirements as those declared on the target location it is assigned to.

@vitek-karas
Copy link
Member

Yes - sorry, I didn't realize this would happen (otherwise I would have preemptively fixed these).

There are actually several issues here, all around Type.BaseType used in a loop. Linker doesn't perform data flow over backward branches (loops), while the analyzer does. The newest analyzer now tries to propagate annotations over the BaseType and because of the better data flow, it leads to warnings.

I will work on fixing these...

/cc @sbomer

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.
@sbomer
Copy link
Member

sbomer commented Mar 18, 2022

I pushed some fixes @vitek-karas made for the legitimate warnings. We are waiting for dependency flow of dotnet/linker#2694 which fixes the other issue (with these two I get a clean build locally). Dependency flow seems to be blocked by https://github.com/dotnet/core-eng/issues/15812.

…318.5

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

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.22160.1 -> To Version 7.0.100-1.22168.6
@akoeplinger
Copy link
Member

@sbomer looks like we got a dependency flow that includes dotnet/linker#2694 but there are still some linker errors in the build.

@sbomer sbomer merged commit ca1b840 into main Mar 21, 2022
@dotnet-maestro dotnet-maestro bot deleted the darc-main-04467fa1-d7d2-45fa-98e8-08272e61ecf7 branch March 21, 2022 22:30
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
* 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: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: vitek-karas <10670590+vitek-karas@users.noreply.github.com>
Co-authored-by: Sven Boemer <sbomer@gmail.com>
@ghost ghost locked as resolved and limited conversation to collaborators Apr 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-codeflow for labeling automated codeflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants