Skip to content

[WIP] Clean up existing source generators to reduce code duplication #2

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

asyncmeow
Copy link
Owner

Existing source generators have a lot of code duplicated between them, this PR aims to fix that.

asyncmeow added 3 commits May 4, 2024 23:10
Extra utility methods were added here so simplify checking if a class has a given attribute on it and if any class members have a given attribute. This drastically reduced how much code we needed to have duplicated between source generators to check if it needs to run on a class.
I realized after I wrote the code initially that emitting diagnostics is not recommended from incremental source generators, since it breaks incremental builds.
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.

1 participant