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

Detect generic cycles in the Roslyn analyzer #94131

Open
MichalStrehovsky opened this issue Oct 28, 2023 · 1 comment
Open

Detect generic cycles in the Roslyn analyzer #94131

MichalStrehovsky opened this issue Oct 28, 2023 · 1 comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Milestone

Comments

@MichalStrehovsky
Copy link
Member

We currently have a gap that generic cycles will get reported by the AOT compiler when ran into, but the analyzer doesn't look for them.

In the general case, the cycle could form across multiple assemblies and a Roslyn analyzer will never see such cycle. In practice, whenever I saw such cycle, it was within a single assembly. So maybe we don't need perfect, a good enough is fine.

We should reuse the cycle detector from the AOT compiler. It was originally ported from .NET Native. I don't even know how it works, I just made it build and hooked it up: dotnet/runtimelab#1681 (notice first commit is just adding files from .NET Native and the next commit just replaces CCI with the managed type system).

@MichalStrehovsky MichalStrehovsky added the area-Tools-ILLink .NET linker development as well as trimming analyzers label Oct 28, 2023
@ghost
Copy link

ghost commented Oct 28, 2023

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

Issue Details

We currently have a gap that generic cycles will get reported by the AOT compiler when ran into, but the analyzer doesn't look for them.

In the general case, the cycle could form across multiple assemblies and a Roslyn analyzer will never see such cycle. In practice, whenever I saw such cycle, it was within a single assembly. So maybe we don't need perfect, a good enough is fine.

We should reuse the cycle detector from the AOT compiler. It was originally ported from .NET Native. I don't even know how it works, I just made it build and hooked it up: dotnet/runtimelab#1681 (notice first commit is just adding files from .NET Native and the next commit just replaces CCI with the managed type system).

Author: MichalStrehovsky
Assignees: -
Labels:

area-Tools-ILLink

Milestone: -

@ghost ghost added the untriaged New issue has not been triaged by the area owner label Oct 28, 2023
@agocke agocke added this to the 9.0.0 milestone Dec 2, 2023
@ghost ghost removed the untriaged New issue has not been triaged by the area owner label Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Tools-ILLink .NET linker development as well as trimming analyzers
Projects
Status: No status
Development

No branches or pull requests

2 participants