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 pub.package_graph; | |
6 | |
7 import 'barback/transformer_cache.dart'; | 5 import 'barback/transformer_cache.dart'; |
8 import 'entrypoint.dart'; | 6 import 'entrypoint.dart'; |
9 import 'lock_file.dart'; | 7 import 'lock_file.dart'; |
10 import 'package.dart'; | 8 import 'package.dart'; |
11 import 'solver/version_solver.dart'; | 9 import 'solver/version_solver.dart'; |
12 import 'source/cached.dart'; | 10 import 'source/cached.dart'; |
13 import 'utils.dart'; | 11 import 'utils.dart'; |
14 | 12 |
15 /// A holistic view of the entire transitive dependency graph for an entrypoint. | 13 /// A holistic view of the entire transitive dependency graph for an entrypoint. |
16 class PackageGraph { | 14 class PackageGraph { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 bool isPackageStatic(String package) { | 150 bool isPackageStatic(String package) { |
153 var id = lockFile.packages[package]; | 151 var id = lockFile.packages[package]; |
154 if (id == null) return false; | 152 if (id == null) return false; |
155 | 153 |
156 var source = entrypoint.cache.sources[id.source]; | 154 var source = entrypoint.cache.sources[id.source]; |
157 if (source is! CachedSource) return false; | 155 if (source is! CachedSource) return false; |
158 | 156 |
159 return packages[package].pubspec.transformers.isEmpty; | 157 return packages[package].pubspec.transformers.isEmpty; |
160 } | 158 } |
161 } | 159 } |
OLD | NEW |