Issue by a14nOriginally opened as dart-lang/sdk#19275
In my zengen package I make modifications on the dart sources through pub transformers. A modification is done based on a resolved AST. Some modifications lead to other modifications that need an up-to-date AST with previous modifications.
To have this AST up to date the only solution I found was to emit the output Asset and reapply the same transformer. And redo this as long as there are code transformations done.
To avoid this recursivity (and perhaps optimize analysis) it would be worth to provide a method like Resolver.applyTextEditTransaction(xxx) (that would call the underlying analysisContext.applyChanges).
Issue by a14n Originally opened as dart-lang/sdk#19275
In my zengen package I make modifications on the dart sources through pub transformers. A modification is done based on a resolved AST. Some modifications lead to other modifications that need an up-to-date AST with previous modifications.
To have this AST up to date the only solution I found was to emit the output Asset and reapply the same transformer. And redo this as long as there are code transformations done.
To avoid this recursivity (and perhaps optimize analysis) it would be worth to provide a method like Resolver.applyTextEditTransaction(xxx) (that would call the underlying analysisContext.applyChanges).