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

Side by Side Diff: pkg/barback/lib/src/transform_node.dart

Issue 22685006: Better handling of asset collisions in barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 4 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/barback/lib/src/phase.dart ('k') | pkg/barback/test/package_graph/errors_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library barback.transform_node; 5 library barback.transform_node;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 8
9 import 'asset.dart'; 9 import 'asset.dart';
10 import 'asset_id.dart'; 10 import 'asset_id.dart';
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 controller.setDirty(); 91 controller.setDirty();
92 } 92 }
93 _onDirtyController.add(null); 93 _onDirtyController.add(null);
94 } 94 }
95 95
96 /// Applies this transform. 96 /// Applies this transform.
97 /// 97 ///
98 /// Returns a set of asset nodes representing the outputs from this transform 98 /// Returns a set of asset nodes representing the outputs from this transform
99 /// that weren't emitted last time it was run. 99 /// that weren't emitted last time it was run.
100 Future<Set<AssetNode>> apply() { 100 Future<Set<AssetNode>> apply() {
101 assert(!_onDirtyController.isClosed);
102
101 var newOutputs = new AssetSet(); 103 var newOutputs = new AssetSet();
102 var transform = createTransform(this, newOutputs); 104 var transform = createTransform(this, newOutputs);
103 105
104 // Clear all the old input subscriptions. If an input is re-used, we'll 106 // Clear all the old input subscriptions. If an input is re-used, we'll
105 // re-subscribe. 107 // re-subscribe.
106 for (var subscription in _inputSubscriptions.values) { 108 for (var subscription in _inputSubscriptions.values) {
107 subscription.cancel(); 109 subscription.cancel();
108 } 110 }
109 _inputSubscriptions.clear(); 111 _inputSubscriptions.clear();
110 112
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 } else { 186 } else {
185 var controller = new AssetNodeController.available(asset); 187 var controller = new AssetNodeController.available(asset);
186 _outputControllers[asset.id] = controller; 188 _outputControllers[asset.id] = controller;
187 brandNewOutputs.add(controller.node); 189 brandNewOutputs.add(controller.node);
188 } 190 }
189 } 191 }
190 192
191 return brandNewOutputs; 193 return brandNewOutputs;
192 } 194 }
193 } 195 }
OLDNEW
« no previous file with comments | « pkg/barback/lib/src/phase.dart ('k') | pkg/barback/test/package_graph/errors_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698