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

Unified Diff: pkg/barback/lib/src/phase_output.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/lib/src/phase_input.dart ('k') | pkg/barback/lib/src/transform_node.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/phase_output.dart
diff --git a/pkg/barback/lib/src/phase_output.dart b/pkg/barback/lib/src/phase_output.dart
index 50d39c3638d5aa0fe413a2e690cd5ceb65b1562e..180715661105cbf87c254d5a8ffc99ed2cf57ce1 100644
--- a/pkg/barback/lib/src/phase_output.dart
+++ b/pkg/barback/lib/src/phase_output.dart
@@ -7,12 +7,10 @@ library barback.phase_output;
import 'dart:async';
import 'dart:collection';
-import 'asset_cascade.dart';
import 'asset_forwarder.dart';
import 'asset_node.dart';
import 'errors.dart';
import 'phase.dart';
-import 'utils.dart';
/// A class that handles a single output of a phase.
///
@@ -38,7 +36,7 @@ class PhaseOutput {
/// A stream that emits an [AssetNode] each time this output starts forwarding
/// a new asset.
Stream<AssetNode> get onAsset => _onAssetController.stream;
- final _onAssetController = new StreamController<AssetNode>();
+ final _onAssetController = new StreamController<AssetNode>(sync: true);
/// The assets for this output.
///
@@ -105,10 +103,8 @@ class PhaseOutput {
// If there's still a collision, report it. This lets the user know if
// they've successfully resolved the collision or not.
if (_assets.length > 1) {
- // Pump the event queue to ensure that the removal of the input triggers
- // a new build to which we can attach the error.
// TODO(nweiz): report this through the output asset.
- newFuture(() => _phase.cascade.reportError(collisionException));
+ _phase.cascade.reportError(collisionException);
}
});
}
« no previous file with comments | « pkg/barback/lib/src/phase_input.dart ('k') | pkg/barback/lib/src/transform_node.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698