Description
openedon May 10, 2022
🤞 Hope this is a suitable place for general guidance to Roslyn, if not feel free to close :)
Hi all! I've been wrestling a lot with incremental SGs lately. The main thing I'm uncertain about at the moment is how caching behaves in my pipeline. I've been trying to unit-test this using the GeneratorDriver
class, similar to what is described in the SG cookbook.
However, I have two main issues:
-
Is there a simple way of accessing data about what stages ran etc? There is some data hidden deep within the
GeneratorDriver
, but it's not very accessible. -
I've been simulating changes to source-code using
Compilation.ReplaceSyntaxTree
. However, when running theGeneratorDriver
after such a replace, it seems that all pipeline nodes 'derived' from the originalSyntaxTree
is re-evaluted (breakpoint is hit), even if the input to the node has been cached. Simply adding a newSyntaxTree
usingCompilation.AddSyntaxTree
does not cause a re-evaluation of the originalSyntaxTree
. Is there a better way of approaching this, or is this simply the expected behaviour?
Thanks!
Activity