-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Simplify PublicTopLevelProgramGenerator #59601
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for opening this PR, @Youssef1313! It looks like there's some build errors that need to be resolved.
BTW, I recognize that multiple transformations aren't necessarily needed, but is there a harm to having them? Also in this case, I figured there might be some value to having some transformations (like the resolution of the syntax nodes) as the last stage in case other transformations fail.
@captainsafia I think yes. It' likely better as a single step. This avoids caching symbols which will be not equatable anyways (not sure if it can cause leak or not though) @CyrusNajmabadi will be better to advise. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hit approve too fast. It looks like this change introduced some test regressions.
src/Framework/AspNetCoreAnalyzers/src/SourceGenerators/PublicTopLevelProgramGenerator.cs
Outdated
Show resolved
Hide resolved
yes. Each step is a new table in our pipeline that we have to compute and compare before/after. Symbols in these steps are particularly bad as they will always compare false. so it's just added cost (both memory and cpu) that never improves incrementality. |
@captainsafia This is hopefully good to merge if CI goes green. |
Simplify PublicTopLevelProgramGenerator
Summary of the changes (Less than 80 chars)
Simplifies the generator
Description
There is no need to have multiple transformations in the generator.
Fixes #{bug number} (in this specific format)