| 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.transform_node; | 5 library barback.transform_node; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:source_maps/span.dart'; | 9 import 'package:source_maps/span.dart'; |
| 10 | 10 |
| 11 import 'asset.dart'; | 11 import 'asset.dart'; |
| 12 import 'asset_id.dart'; | 12 import 'asset_id.dart'; |
| 13 import 'asset_node.dart'; | 13 import 'asset_node.dart'; |
| 14 import 'asset_set.dart'; | 14 import 'asset_set.dart'; |
| 15 import 'barback_logger.dart'; | |
| 16 import 'errors.dart'; | 15 import 'errors.dart'; |
| 16 import 'log.dart'; |
| 17 import 'phase.dart'; | 17 import 'phase.dart'; |
| 18 import 'transform.dart'; | 18 import 'transform.dart'; |
| 19 import 'transformer.dart'; | 19 import 'transformer.dart'; |
| 20 | 20 |
| 21 /// Describes a transform on a set of assets and its relationship to the build | 21 /// Describes a transform on a set of assets and its relationship to the build |
| 22 /// dependency graph. | 22 /// dependency graph. |
| 23 /// | 23 /// |
| 24 /// Keeps track of whether it's dirty and needs to be run and which assets it | 24 /// Keeps track of whether it's dirty and needs to be run and which assets it |
| 25 /// depends on. | 25 /// depends on. |
| 26 class TransformNode { | 26 class TransformNode { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 brandNewOutputs.add(controller.node); | 211 brandNewOutputs.add(controller.node); |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| 215 return brandNewOutputs; | 215 return brandNewOutputs; |
| 216 } | 216 } |
| 217 | 217 |
| 218 void _log(AssetId asset, LogLevel level, String message, Span span) { | 218 void _log(AssetId asset, LogLevel level, String message, Span span) { |
| 219 // If the log isn't already associated with an asset, use the primary. | 219 // If the log isn't already associated with an asset, use the primary. |
| 220 if (asset == null) asset = primary.id; | 220 if (asset == null) asset = primary.id; |
| 221 var info = new TransformInfo(transformer, primary.id); | |
| 222 var entry = new LogEntry(info, asset, level, message, span); | 221 var entry = new LogEntry(info, asset, level, message, span); |
| 223 _onLogController.add(entry); | 222 _onLogController.add(entry); |
| 224 } | 223 } |
| 225 } | 224 } |
| OLD | NEW |