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

Unified Diff: pkg/barback/lib/src/transform_node.dart

Issue 29763003: Make barback propagate logs synchronously. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/transform_node.dart
diff --git a/pkg/barback/lib/src/transform_node.dart b/pkg/barback/lib/src/transform_node.dart
index 56605c2617e63e8f9a877d96beb40cbace5d3eb5..6df431540abf424db33bf94c2efa608a75a01b7e 100644
--- a/pkg/barback/lib/src/transform_node.dart
+++ b/pkg/barback/lib/src/transform_node.dart
@@ -55,8 +55,12 @@ class TransformNode {
final _onDirtyController = new StreamController.broadcast(sync: true);
/// A stream that emits an event whenever this transform logs an entry.
+ ///
+ /// This is synchronous because error logs can cause the transform to fail, so
+ /// we need to ensure that their processing isn't delayed until after the
+ /// transform or build has finished.
Stream<LogEntry> get onLog => _onLogController.stream;
- final _onLogController = new StreamController<LogEntry>.broadcast();
+ final _onLogController = new StreamController<LogEntry>.broadcast(sync: true);
TransformNode(this.phase, this.transformer, this.primary) {
_primarySubscription = primary.onStateChange.listen((state) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698