Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(233)

Unified Diff: sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart

Issue 187263003: Move Barback to a more thoroughly push-based model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/barback/test/utils.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart
diff --git a/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart b/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart
index 21585cd9036196c6ed90ea34242f583fc45e2562..537663528263ccf6169abf29fa0cf19bc5d651fe 100644
--- a/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart
+++ b/sdk/lib/_internal/pub/lib/src/barback/load_all_transformers.dart
@@ -120,7 +120,14 @@ Future loadAllTransformers(BuildEnvironment environment) {
var transformers = environment.getBuiltInTransformers(package);
if (transformers != null) phases.add(transformers);
- environment.barback.updateTransformers(package.name, phases);
+ // TODO(nweiz): remove the [newFuture] here when issue 17305 is fixed. If
+ // no transformer in [phases] applies to a source input,
+ // [updateTransformers] may cause a [BuildResult] to be scheduled for
+ // immediate emission. Issue 17305 means that the caller will be unable to
+ // receive this result unless we delay the update to after this function
+ // returns.
+ newFuture(() =>
+ environment.barback.updateTransformers(package.name, phases));
}
});
}
« no previous file with comments | « pkg/barback/test/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698