Description
I would expect a well-behaved generator to only execute when code is changed that activates it. I would expect that generator to demonstrate significantly different performance characteristics when editing code which doesn't activate it vs code that does activate it (or otherwise influence its outputs).
This is not what I observe with the ConfigurationBinder source generator. It seems to be running and consuming ~ the same amount of CPU regardless of if I make edits to unrelated files vs files which should influence the generator output.
I tested it with https://github.com/chsienki/GeneratorTracer and a project that gives the generator a lot of work. I also added explicit events to measure the bulk of the work in the Parse and Emit phases and they agree with this: ericstj@c10104c
And hacked @chsienki's tool to measure those: ericstj/GeneratorTracer@c2e33bf
After doing this I see lots of executions of the parse and emit phases even when making completely unrelated edits.
I'm not certain if what I'm observing here is normal and expected or not, but it does disagree with what I would expect from a functioning incremental build pipeline (only rerun when changes are needed).
I'd like to have a closer look at this with compiler folks and other generator authors to understand if what I see is normal or a problem.
@eiriktsarpalis @CyrusNajmabadi @chsienki @captainsafia