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

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

Issue 37813002: Don't return outputs from a removed PhaseInput. (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 | « pkg/barback/lib/src/phase.dart ('k') | pkg/barback/test/package_graph/transform_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/phase_input.dart
diff --git a/pkg/barback/lib/src/phase_input.dart b/pkg/barback/lib/src/phase_input.dart
index 552fa5daf9f5a7b1e536eaca2561db24d56cf1f9..1b96ee0de49cb56637b01a034c206993c36494a2 100644
--- a/pkg/barback/lib/src/phase_input.dart
+++ b/pkg/barback/lib/src/phase_input.dart
@@ -273,9 +273,15 @@ class PhaseInput {
}
/// Processes the transforms for this input.
+ ///
+ /// Returns the set of newly-created asset nodes that transforms have emitted
+ /// for this input. The assets returned this way are guaranteed not to be
+ /// [AssetState.REMOVED].
Future<Set<AssetNode>> process() {
- if (_adjustTransformersFuture == null) return _processTransforms();
- return _waitForTransformers(() => _processTransforms());
+ return _waitForTransformers(() => _processTransforms()).then((outputs) {
+ if (input.state.isRemoved) return new Set();
+ return outputs;
+ });
}
/// Runs [callback] once all the transformers are adjusted correctly and the
« no previous file with comments | « pkg/barback/lib/src/phase.dart ('k') | pkg/barback/test/package_graph/transform_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698