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

Incremental Generator #99

Open
viceroypenguin opened this issue Dec 22, 2023 · 1 comment
Open

Incremental Generator #99

viceroypenguin opened this issue Dec 22, 2023 · 1 comment
Labels
enhancement New feature or request SourceGenerator

Comments

@viceroypenguin
Copy link

I've been using Scriban as my templating engine for a while, and I came across your live editor for Scriban files. I'd love to switch to your NTypewriter.SourceGenerator for some of my stuff, but I noticed that it is still dependent on ISourceGenerator.

Are there any plans to upgrade to IIncrementalGenerator? This would improve performance and the source generator to be done live instead of only at VS Load.

@NeVeSpl
Copy link
Owner

NeVeSpl commented Dec 22, 2023

Rendering is done on every full build not only on VS load.

NTypewriter.SourceGenerator will never be upgraded to IIncrementalGenerator, more likely a new one called NTypewriter.IncrementalSourceGenerator will be added.

Keep in mind that right now in .nt templates users have access to every type from the project. To take advantage of IIncrementalGenerator, .nt templates would have to be per single type, and somehow be able to define a predicate to filter when IIncrementalGenerator should run.

@NeVeSpl NeVeSpl added enhancement New feature or request SourceGenerator labels Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SourceGenerator
Projects
None yet
Development

No branches or pull requests

2 participants