| 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.package_graph; | 5 library barback.package_graph; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:stack_trace/stack_trace.dart'; | |
| 10 | |
| 11 import 'asset.dart'; | |
| 12 import 'asset_cascade.dart'; | 9 import 'asset_cascade.dart'; |
| 13 import 'asset_id.dart'; | 10 import 'asset_id.dart'; |
| 14 import 'asset_node.dart'; | 11 import 'asset_node.dart'; |
| 15 import 'build_result.dart'; | 12 import 'build_result.dart'; |
| 16 import 'errors.dart'; | 13 import 'errors.dart'; |
| 17 import 'package_provider.dart'; | 14 import 'package_provider.dart'; |
| 18 import 'utils.dart'; | 15 import 'utils.dart'; |
| 19 | 16 |
| 20 /// The collection of [AssetCascade]s for an entire application. | 17 /// The collection of [AssetCascade]s for an entire application. |
| 21 /// | 18 /// |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 /// Removes [removed] from the graph's known set of source assets. | 109 /// Removes [removed] from the graph's known set of source assets. |
| 113 void removeSources(Iterable<AssetId> sources) { | 110 void removeSources(Iterable<AssetId> sources) { |
| 114 groupBy(sources, (id) => id.package).forEach((package, ids) { | 111 groupBy(sources, (id) => id.package).forEach((package, ids) { |
| 115 var cascade = _cascades[package]; | 112 var cascade = _cascades[package]; |
| 116 if (cascade == null) throw new ArgumentError("Unknown package $package."); | 113 if (cascade == null) throw new ArgumentError("Unknown package $package."); |
| 117 _cascadeResults[package] = null; | 114 _cascadeResults[package] = null; |
| 118 cascade.removeSources(ids); | 115 cascade.removeSources(ids); |
| 119 }); | 116 }); |
| 120 } | 117 } |
| 121 } | 118 } |
| OLD | NEW |