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

Incrementality of this generator is under the question. #81

Closed
lsoft opened this issue Jan 13, 2024 · 2 comments
Closed

Incrementality of this generator is under the question. #81

lsoft opened this issue Jan 13, 2024 · 2 comments
Assignees

Comments

@lsoft
Copy link

lsoft commented Jan 13, 2024

Sorry for disturbing you, I noticed about this problem about a week ago and I'm not sure I understand this correctly, but looks like this generator is not incremental at all.

Here I read that

 I think I know what tutorial you probably followed here, but I'm afraid it was just completely incorrect.
...
You should never have any compilations or symbols in any steps of your incremental pipelines, and especially in output steps.
Those objects are not equatable and not meant to be used this way.

IncrementalValueProvider<(Compilation, ImmutableArray<EnumDeclarationSyntax>)> compilationAndEnums

If I correct it would super cool to fix this place and update your tutorial. A lot of people follow that tutorial and obtain this error.

Again, I'm not sure I understand the things correctly. Sorry if I'm wrong.
Thanks!

@andrewlock
Copy link
Owner

Yikes, yeah, I wrote that series shortly after incremental generators were released, and noone really understood the requirements at the time 😬 I'm planning an updated blog post on these perf things anyway, so I'll prioritise updating those posts at the same time.

Thanks for the heads up!

@andrewlock
Copy link
Owner

FYI, I've just updated that post, and the example code in here 🙂 I would still recommend basing any generators you write off the "production" version here: https://github.com/andrewlock/NetEscapades.EnumGenerators but at least it's not so obviously broken now! 🤦‍♂️ Thanks

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

2 participants