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

Provide SourceGenerator as well as the new Incremental Source Generator for better performance #6229

Open
danielmarbach opened this issue Jan 18, 2022 · 0 comments

Comments

@danielmarbach
Copy link
Contributor

The incremental source generators allow optimizing the code generation strategies for faster execution, which greatly benefits the overall IDE experience. It is possible to share common code between both approaches and then package the source generator for Roslyn3.x for backward compatibility and the incremental source generator for Roslyn4 together into the same package.

image (3)

How that is done can be seen in

https://github.com/dotnet/runtime/tree/main/src/libraries/System.Text.Json/gen

The other trick to make it work for older versions that don't support "Roslyn Component Versioning" is the targets file they include in the package's build folder

See also dotnet/sdk#20355

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant