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

Source generators should implement IIncrementalGenerator instead of ISourceGenerator #3

Open
sharwell opened this issue Jan 20, 2022 · 2 comments

Comments

@sharwell
Copy link

The following source generators implement the "V1" API and use a syntax receiver, which requires reprocessing the entire project after every edit to a source file. This behavior quickly and unavoidably overwhelms the IDE for medium to large projects.

Switching to IIncrementalGenerator allows for incremental processing of syntax to avoid this overhead.

@davkean
Copy link

davkean commented Jan 20, 2022

This Visual Studio Developer Community issue was root caused to this: https://developercommunity.visualstudio.com/t/visual-studio-is-near-2022-uselessly-slow-for-me/1638239.

@stefanloerwald
Copy link
Member

Thanks for raising this. I can see why incremental generators are superior and wish they had been a thing from earlier on. Unfortunately I don't have the time to transition this project to using them, but I'm happy to review PRs that do so.

Side note: the usefulness of this project of this project is unfortunately limited, since one has to make the trade-off between the razor source generator and this library. Both cannot be used simultaneously, which is a huge shame.

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

No branches or pull requests

3 participants