dart-archive / code_transformers

Package to help with code transformers in barback
https://pub.dartlang.org/packages/code_transformers
BSD 3-Clause "New" or "Revised" License
5 stars 11 forks source link

provide a way to update AnalysisContext in code_transformer package #19

Open DartBot opened 9 years ago

DartBot commented 9 years ago

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).

DartBot commented 9 years ago

Comment by iposva-google


Added Pkg-CodeTransformers, Area-Pkg, Triaged labels.

DartBot commented 9 years ago

Comment by sigmundch


Added this to the Later milestone. Removed Priority-Unassigned label. Added Priority-Medium label.

DartBot commented 9 years ago

Comment by sigmundch


Added Polymer-P-2 label.

DartBot commented 9 years ago

Comment by sigmundch


Removed this from the Later milestone.

DartBot commented 9 years ago

Comment by sigmundch


Removed Polymer-P-2 label. Added Polymer-Milestone-Later label.

DartBot commented 9 years ago

Comment by sigmundch


Removed Polymer-Milestone-Later label. Added PolymerMilestone-Later label.