OLD | NEW |
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.asset_cascade; | 5 library barback.graph.asset_cascade; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'asset.dart'; | 9 import '../asset/asset.dart'; |
10 import 'asset_id.dart'; | 10 import '../asset/asset_id.dart'; |
11 import 'asset_node.dart'; | 11 import '../asset/asset_node.dart'; |
12 import 'asset_set.dart'; | 12 import '../asset/asset_set.dart'; |
13 import 'cancelable_future.dart'; | 13 import '../errors.dart'; |
14 import 'errors.dart'; | 14 import '../log.dart'; |
15 import 'log.dart'; | 15 import '../transformer/transformer.dart'; |
| 16 import '../utils/cancelable_future.dart'; |
16 import 'node_status.dart'; | 17 import 'node_status.dart'; |
17 import 'node_streams.dart'; | 18 import 'node_streams.dart'; |
18 import 'package_graph.dart'; | 19 import 'package_graph.dart'; |
19 import 'phase.dart'; | 20 import 'phase.dart'; |
20 import 'transformer.dart'; | |
21 | 21 |
22 /// The asset cascade for an individual package. | 22 /// The asset cascade for an individual package. |
23 /// | 23 /// |
24 /// This keeps track of which [Transformer]s are applied to which assets, and | 24 /// This keeps track of which [Transformer]s are applied to which assets, and |
25 /// re-runs those transformers when their dependencies change. The transformed | 25 /// re-runs those transformers when their dependencies change. The transformed |
26 /// asset nodes are accessible via [getAssetNode]. | 26 /// asset nodes are accessible via [getAssetNode]. |
27 /// | 27 /// |
28 /// A cascade consists of one or more [Phases], each of which has one or more | 28 /// A cascade consists of one or more [Phases], each of which has one or more |
29 /// [Transformer]s that run in parallel, potentially on the same inputs. The | 29 /// [Transformer]s that run in parallel, potentially on the same inputs. The |
30 /// inputs of the first phase are the source assets for this cascade's package. | 30 /// inputs of the first phase are the source assets for this cascade's package. |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 _streams.onLogPool.add(phase.onLog); | 213 _streams.onLogPool.add(phase.onLog); |
214 if (_phaseStatusSubscription != null) _phaseStatusSubscription.cancel(); | 214 if (_phaseStatusSubscription != null) _phaseStatusSubscription.cancel(); |
215 _phaseStatusSubscription = | 215 _phaseStatusSubscription = |
216 phase.onStatusChange.listen(_streams.changeStatus); | 216 phase.onStatusChange.listen(_streams.changeStatus); |
217 | 217 |
218 _phases.add(phase); | 218 _phases.add(phase); |
219 } | 219 } |
220 | 220 |
221 String toString() => "cascade for $package"; | 221 String toString() => "cascade for $package"; |
222 } | 222 } |
OLD | NEW |