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

Commit 0f2580a

Browse files
taisphjbdeboer
authored andcommitted
fix(transformer): Don't share resolvers between parallel transformers as this will cause a deadlock
Fixes #1276 Closes #1382
1 parent b495505 commit 0f2580a

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

lib/transformer.dart

+10-7
Original file line numberDiff line numberDiff line change
@@ -116,19 +116,22 @@ Map<String, String> _readStringMapValue(Map args, String name) {
116116
return value;
117117
}
118118

119-
List<List<Transformer>> _createPhases(TransformOptions options) {
119+
Transformer _staticGenerator(TransformOptions options) {
120120
var resolvers = new Resolvers(options.sdkDirectory);
121-
return [
122-
[ new HtmlDartReferencesGenerator(options) ],
123-
[ new di.InjectorGenerator(options.diOptions, resolvers) ],
124-
[ new _SerialTransformer([
121+
return new _SerialTransformer([
125122
new ExpressionGenerator(options, resolvers),
126123
new MetadataGenerator(options, resolvers),
127124
new StaticAngularGenerator(options, resolvers)
128-
])]
129-
];
125+
]);
130126
}
131127

128+
List<List<Transformer>> _createPhases(TransformOptions options) =>
129+
[
130+
[ new HtmlDartReferencesGenerator(options) ],
131+
[ new di.InjectorGenerator(options.diOptions, new Resolvers(options.sdkDirectory)) ],
132+
[ _staticGenerator(options) ]
133+
];
134+
132135
/// Helper which runs a group of transformers serially and ensures that
133136
/// transformers with shared data are always applied in a specific order.
134137
///

0 commit comments

Comments
 (0)