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.phase_output; | 5 library barback.graph.phase_output; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection'; | 8 import 'dart:collection'; |
9 | 9 |
10 import 'asset_forwarder.dart'; | 10 import '../asset/asset_forwarder.dart'; |
11 import 'asset_node.dart'; | 11 import '../asset/asset_node.dart'; |
12 import 'errors.dart'; | 12 import '../errors.dart'; |
13 import 'phase.dart'; | 13 import 'phase.dart'; |
14 | 14 |
15 /// A class that handles a single output of a phase. | 15 /// A class that handles a single output of a phase. |
16 /// | 16 /// |
17 /// Normally there's only a single [AssetNode] for a phase's output, but it's | 17 /// Normally there's only a single [AssetNode] for a phase's output, but it's |
18 /// possible that multiple transformers in the same phase emit assets with the | 18 /// possible that multiple transformers in the same phase emit assets with the |
19 /// same id, causing collisions. This handles those collisions by forwarding the | 19 /// same id, causing collisions. This handles those collisions by forwarding the |
20 /// chronologically first asset. | 20 /// chronologically first asset. |
21 /// | 21 /// |
22 /// When the asset being forwarding changes, the old value of [output] will be | 22 /// When the asset being forwarding changes, the old value of [output] will be |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
105 // they've successfully resolved the collision or not. | 105 // they've successfully resolved the collision or not. |
106 if (_assets.length > 1) { | 106 if (_assets.length > 1) { |
107 // TODO(nweiz): report this through the output asset. | 107 // TODO(nweiz): report this through the output asset. |
108 _phase.cascade.reportError(collisionException); | 108 _phase.cascade.reportError(collisionException); |
109 } | 109 } |
110 }); | 110 }); |
111 } | 111 } |
112 | 112 |
113 String toString() => "phase output in $_location for $output"; | 113 String toString() => "phase output in $_location for $output"; |
114 } | 114 } |
OLD | NEW |