Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

Commit

Permalink
fix(transformer): Don't share resolvers between parallel transformers…
Browse files Browse the repository at this point in the history
… as this will cause a deadlock

Fixes #1276
Closes #1382
  • Loading branch information
taisph authored and jbdeboer committed Aug 22, 2014
1 parent f54451b commit 0ae5b01
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions lib/transformer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -116,19 +116,22 @@ Map<String, String> _readStringMapValue(Map args, String name) {
return value;
}

List<List<Transformer>> _createPhases(TransformOptions options) {
Transformer _staticGenerator(TransformOptions options) {
var resolvers = new Resolvers(options.sdkDirectory);
return [
[ new HtmlDartReferencesGenerator(options) ],
[ new di.InjectorGenerator(options.diOptions, resolvers) ],
[ new _SerialTransformer([
return new _SerialTransformer([
new ExpressionGenerator(options, resolvers),
new MetadataGenerator(options, resolvers),
new StaticAngularGenerator(options, resolvers)
])]
];
]);
}

List<List<Transformer>> _createPhases(TransformOptions options) =>
[
[ new HtmlDartReferencesGenerator(options) ],
[ new di.InjectorGenerator(options.diOptions, new Resolvers(options.sdkDirectory)) ],
[ _staticGenerator(options) ]
];

/// Helper which runs a group of transformers serially and ensures that
/// transformers with shared data are always applied in a specific order.
///
Expand Down

0 comments on commit 0ae5b01

Please sign in to comment.