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

Use special source generator suffix when generating code. #5959

Closed
wants to merge 2 commits into from

Conversation

AraHaan
Copy link
Member

@AraHaan AraHaan commented Apr 9, 2022

Fixes #5958.

@AraHaan AraHaan requested a review from a team as a code owner April 9, 2022 16:50
@AraHaan AraHaan changed the title Use special source generater suffix when generating code. Use special source generator suffix when generating code. Apr 9, 2022
@AraHaan
Copy link
Member Author

AraHaan commented Apr 9, 2022

The failure is a known coverlet.msbuild issue.

Copy link
Member

@Youssef1313 Youssef1313 left a comment

Choose a reason for hiding this comment

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

LGTM, but whatever tool that respects .g.cs should also respect the // <auto-generated/> comment at the beginning of source files.

@AraHaan
Copy link
Member Author

AraHaan commented Apr 10, 2022

Unfortunately there are multiple different ways of also marking a file with that comment (or rather multiple different versions of the comment that it would need to check for that make the check complex) vs just checking if it ends with .g.cs on the end of it's generated filename and being done with it all.

Copy link
Member

@sharwell sharwell left a comment

Choose a reason for hiding this comment

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

.Designer.cs is already one of the special generated source suffixes. I don't believe there is any need to change from .Designer.cs to .g.cs.

@sharwell sharwell closed this Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Microsoft.CodeAnalysis.ResxSourceGenerator does not use .g.cs suffix on generated code.
3 participants