Skip to content

Conversation

@MichalStrehovsky
Copy link
Member

The flow from the runtime repo is currently broken in dotnet/sdk#37653.

      Test output contained the following extra linker warnings:
      + ILLink : Trim analysis warning IL2065: System.Reflection.Emit.TypeBuilderImpl.CheckInterfaces(Type[]): Value passed to implicit 'this' parameter of method 'System.Type.GetMethods(BindingFlags)' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements. [C:\h\w\9F8E08D0\t\dotnetSdkTests\xt13z3tr.2qv\ILLink_verify---A58CFA90\AnalysisWarningsOnHelloWorldApp\AnalysisWarningsOnHelloWorldApp.csproj]
      + ILLink : Trim analysis warning IL2065: System.Reflection.Emit.TypeBuilderImpl.CheckInterfaces(Type[]): Value passed to implicit 'this' parameter of method 'System.Type.GetInterfaces()' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements. [C:\h\w\9F8E08D0\t\dotnetSdkTests\xt13z3tr.2qv\ILLink_verify---A58CFA90\AnalysisWarningsOnHelloWorldApp\AnalysisWarningsOnHelloWorldApp.csproj]

Cc @dotnet/illink-contrib - I don't actually understand why we're not seeing this in this repo and only in the SDK repo.

@ghost
Copy link

ghost commented Dec 27, 2023

Tagging subscribers to this area: @dotnet/area-system-reflection-emit
See info in area-owners.md if you want to be subscribed.

Issue Details

The flow from the runtime repo is currently broken in dotnet/sdk#37653.

      Test output contained the following extra linker warnings:
      + ILLink : Trim analysis warning IL2065: System.Reflection.Emit.TypeBuilderImpl.CheckInterfaces(Type[]): Value passed to implicit 'this' parameter of method 'System.Type.GetMethods(BindingFlags)' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements. [C:\h\w\9F8E08D0\t\dotnetSdkTests\xt13z3tr.2qv\ILLink_verify---A58CFA90\AnalysisWarningsOnHelloWorldApp\AnalysisWarningsOnHelloWorldApp.csproj]
      + ILLink : Trim analysis warning IL2065: System.Reflection.Emit.TypeBuilderImpl.CheckInterfaces(Type[]): Value passed to implicit 'this' parameter of method 'System.Type.GetInterfaces()' can not be statically determined and may not meet 'DynamicallyAccessedMembersAttribute' requirements. [C:\h\w\9F8E08D0\t\dotnetSdkTests\xt13z3tr.2qv\ILLink_verify---A58CFA90\AnalysisWarningsOnHelloWorldApp\AnalysisWarningsOnHelloWorldApp.csproj]

Cc @dotnet/illink-contrib - I don't actually understand why we're not seeing this in this repo and only in the SDK repo.

Author: MichalStrehovsky
Assignees: MichalStrehovsky
Labels:

area-System.Reflection.Emit

Milestone: -

@MichalStrehovsky
Copy link
Member Author

@buyaa-n the CheckInterfaces method looks like it will block things unnecessarily when default interface methods are involved and it will not block enough things when unimplemented static abstracts are involved.

@am11
Copy link
Member

am11 commented Dec 27, 2023

I don't actually understand why we're not seeing this in this repo and only in the SDK repo.

Perhaps the live build of linker is not used consistently in the runtime repo? Linker failures in #95980 suggest that be the case. Some issues are promptly discovered when changing llinker code in runtime repo during the initial PR, some are discovered passively when SDK is updating runtime (few times a day) and the rest are discovered at very low pace when runtime is updating SDK (few times a year).

Copy link
Contributor

@buyaa-n buyaa-n left a comment

Choose a reason for hiding this comment

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

Thank you!

@MichalStrehovsky MichalStrehovsky merged commit 8121f82 into main Dec 27, 2023
@MichalStrehovsky MichalStrehovsky deleted the MichalStrehovsky-patch-1 branch December 27, 2023 22:02
@sbomer
Copy link
Member

sbomer commented Dec 28, 2023

I don't actually understand why we're not seeing this in this repo and only in the SDK repo.

dotnet/runtime suppresses IL2065. I think those suppressions were supposed to be removed as part of #38033 and should be cleaned up.

@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2024
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.

6 participants