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

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: Code review changes. 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
« no previous file with comments | « pkg/barback/lib/src/errors.dart ('k') | pkg/barback/lib/src/utils.dart » ('j') | 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 194f07333959701b932f3cf3df50315e74078015..84884a7cd31e4043b0e8cb625b8b177c5abc23c5 100644
--- a/pkg/barback/lib/src/transform_node.dart
+++ b/pkg/barback/lib/src/transform_node.dart
@@ -86,6 +86,16 @@ 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.removeAll(invalidIds);
+
+ for (var id in invalidIds) {
+ // TODO(nweiz): report this as a warning rather than a failing error.
+ phase.graph.reportError(
+ new InvalidOutputException(phase.graph.package, id));
+ }
+
var removed = _outputs.difference(outputIds);
_outputs = outputIds;
« no previous file with comments | « pkg/barback/lib/src/errors.dart ('k') | pkg/barback/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698