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

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

Issue 5695057915019264: Make barback more package-aware. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Additional tests. Created 7 years, 5 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
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 194f07333959701b932f3cf3df50315e74078015..c1bbcfd7df0f88c17fb7a610d0af3bf65ede7932 100644
--- a/pkg/barback/lib/src/transform_node.dart
+++ b/pkg/barback/lib/src/transform_node.dart
@@ -86,6 +86,17 @@ class TransformNode {
// See which outputs are missing from the last run.
var outputIds = newOutputs.map((asset) => asset.id).toSet();
+ var invalidIds = outputIds
+ .where((id) => id.package != phase.graph.package).toSet();
+ outputIds = outputIds.removeAll(invalidIds);
+
+ // TODO(nweiz): if there are invalid ids, do we consider the transform to
+ // have failed?
Bob Nystrom 2013/07/16 17:36:01 Probably not, I think.
nweiz 2013/07/16 19:39:39 Right now we have no means of reporting a bad cond
+ for (var id in invalidIds) {
+ phase.graph.reportError(
+ new InvalidOutputException(phase.graph.package, id));
+ }
+
var removed = _outputs.difference(outputIds);
_outputs = outputIds;

Powered by Google App Engine
This is Rietveld 408576698