Index: pkg/barback/lib/src/phase.dart |
diff --git a/pkg/barback/lib/src/phase.dart b/pkg/barback/lib/src/phase.dart |
index 2136a1281e94d65e04d1914441a4b94ec7faeb90..9aa5484bea828a301df3d0c349ff9e500932176d 100644 |
--- a/pkg/barback/lib/src/phase.dart |
+++ b/pkg/barback/lib/src/phase.dart |
@@ -136,6 +136,8 @@ class Phase { |
void addInput(AssetNode node) { |
if (_inputs.containsKey(node.id)) _inputs[node.id].remove(); |
+ node.materialize(); |
Bob Nystrom
2014/01/30 19:33:44
Why is this being materialized?
nweiz
2014/01/31 03:43:27
The phase needs its inputs to be available if it's
|
+ |
// Each group is one channel along which an asset may be forwarded. Then |
// there's one additional channel for the non-grouped transformers. |
var forwarder = new PhaseForwarder(_groups.length + 1); |
@@ -182,7 +184,7 @@ class Phase { |
return newFuture(() { |
if (id.package != cascade.package) return cascade.graph.getAssetNode(id); |
if (!_outputs.containsKey(id)) return null; |
- return _outputs[id].output; |
+ return _outputs[id].output..materialize(); |
Bob Nystrom
2014/01/30 19:33:44
Nit, but I'm really not a fan of using a single ca
nweiz
2014/01/31 03:43:27
I think it's nicer than making a variable, but oka
|
}); |
} |
@@ -219,6 +221,17 @@ class Phase { |
} |
} |
+ /// Materialize all [LazyTransformer]s' transforms in this group. |
+ void materializeAllTransforms() { |
+ for (var group in _groups.values) { |
+ group.materializeAllTransforms(); |
+ } |
+ |
+ for (var input in _inputs.values) { |
+ input.materializeAllTransforms(); |
+ } |
+ } |
+ |
/// Add a new phase after this one with [transformers]. |
/// |
/// This may only be called on a phase with no phase following it. |