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

Add correct ImplementingType and InterfaceImpl to DIM cache in TypeMapInfo #98513

Merged
merged 10 commits into from
Feb 22, 2024

Conversation

jtschuster
Copy link
Member

@jtschuster jtschuster commented Feb 15, 2024

From #98436 (comment)

We don't add the correct ImplementingType to the DIM's cache. Instead we can pass the correct implementing type to FindAndAddDefaultInterfaceImplementations. This worked fine for assemblies compiled by Roslyn because it adds an InterfaceImpl for all transitive interfaces, but IL doesn't require that.

Test cases for this require types that don't have interfaceimpls for all their interfaces directly on their type, but that also fails for another reason: #98536. Test cases in #98540 should cover both issues.

@ghost ghost assigned jtschuster Feb 15, 2024
@dotnet-issue-labeler dotnet-issue-labeler bot added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Feb 15, 2024
@ghost
Copy link

ghost commented Feb 15, 2024

Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas
See info in area-owners.md if you want to be subscribed.

Issue Details

From #98436 (comment)

We don't add the correct ImplementingType to the DIM's cache. Instead we can pass the correct implementing type to FindAndAddDefaultInterfaceImplementations. This worked fine for assemblies compiled by Roslyn because it adds an InterfaceImpl for all transitive interfaces, but IL doesn't require that.

Working on a test case that fails without this change.

Author: jtschuster
Assignees: jtschuster
Labels:

area-Tools-ILLink

Milestone: -

@jtschuster jtschuster changed the title Add correct ImplementingType to DIM cache in TypeMapInfo Add correct ImplementingType and InterfaceImpl to DIM cache in TypeMapInfo Feb 16, 2024
@jtschuster
Copy link
Member Author

Failures are known

@jtschuster jtschuster merged commit 9da5359 into dotnet:main Feb 22, 2024
74 of 76 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Mar 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants