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

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

Issue 18650004: Make Assets know their ID. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Tweak doc. 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/transform.dart ('k') | pkg/barback/lib/src/transformer.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 49222be9e5af2e184eb0c45e30520ab2c55d53fd..194f07333959701b932f3cf3df50315e74078015 100644
--- a/pkg/barback/lib/src/transform_node.dart
+++ b/pkg/barback/lib/src/transform_node.dart
@@ -10,6 +10,7 @@ import 'asset.dart';
import 'asset_graph.dart';
import 'asset_id.dart';
import 'asset_node.dart';
+import 'asset_set.dart';
import 'errors.dart';
import 'phase.dart';
import 'transform.dart';
@@ -58,7 +59,7 @@ class TransformNode {
/// previous runs.
Future<TransformOutputs> apply() {
var newInputs = new Set<AssetNode>();
- var newOutputs = new Map<AssetId, Asset>();
+ var newOutputs = new AssetSet();
var transform = createTransform(this, newInputs, newOutputs);
return _transformer.apply(transform).catchError((error) {
// Catch all transformer errors and pipe them to the results stream.
@@ -84,7 +85,7 @@ class TransformNode {
_inputs = newInputs;
// See which outputs are missing from the last run.
- var outputIds = newOutputs.keys.toSet();
+ var outputIds = newOutputs.map((asset) => asset.id).toSet();
var removed = _outputs.difference(outputIds);
_outputs = outputIds;
@@ -97,7 +98,7 @@ class TransformNode {
/// applied.
class TransformOutputs {
/// The outputs that are new or were modified since the last run.
- final Map<AssetId, Asset> updated;
+ final AssetSet updated;
/// The outputs that were created by the previous run but were not generated
/// by the most recent run.
« no previous file with comments | « pkg/barback/lib/src/transform.dart ('k') | pkg/barback/lib/src/transformer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698