Skip to content

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 dart-archive#1276
Closes dart-archive#1382

Conflicts:
	lib/transformer.dart
  • Loading branch information
dsalsbury committed Aug 25, 2014
1 parent 6a06fb1 commit 526a57d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
21 changes: 12 additions & 9 deletions lib/transformer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,20 +117,23 @@ 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([
new TypeRelativeUriGenerator(options, resolvers),
return new _SerialTransformer([
new ExpressionGenerator(options, resolvers),
new MetadataGenerator(options, resolvers),
new StaticAngularGenerator(options, resolvers)
])]
];
new StaticAngularGenerator(options, resolvers),
new TypeRelativeUriGenerator(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
8 changes: 2 additions & 6 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ packages:
barback:
description: barback
source: hosted
version: "0.14.1+3"
version: "0.14.0+3"
benchmark_harness:
description: benchmark_harness
source: hosted
Expand Down Expand Up @@ -85,14 +85,10 @@ packages:
description: source_maps
source: hosted
version: "0.9.3"
source_span:
description: source_span
source: hosted
version: "1.0.0"
stack_trace:
description: stack_trace
source: hosted
version: "1.0.2"
version: "0.9.3+2"
typed_mock:
description: typed_mock
source: hosted
Expand Down

0 comments on commit 526a57d

Please sign in to comment.