Index: lib/src/package_graph.dart |
diff --git a/lib/src/package_graph.dart b/lib/src/package_graph.dart |
index ae603ed2e388ed3e26bb264df2f8ff38ba0252dd..f6b4a9317811de7fb20dca417a4c4f0bd3c55ef0 100644 |
--- a/lib/src/package_graph.dart |
+++ b/lib/src/package_graph.dart |
@@ -48,7 +48,7 @@ class PackageGraph { |
if (id.name == entrypoint.root.name) return entrypoint.root; |
return new Package(result.pubspecs[id.name], |
- entrypoint.cache.sources[id.source].getDirectory(id)); |
+ entrypoint.cache.source(id.source).getDirectory(id)); |
}); |
return new PackageGraph(entrypoint, result.lockFile, packages); |
@@ -125,8 +125,7 @@ class PackageGraph { |
var id = lockFile.packages[package]; |
if (id == null) return true; |
- var source = entrypoint.cache.sources[id.source]; |
- if (source is! CachedSource) return true; |
+ if (entrypoint.cache.source(id.source) is! CachedSource) return true; |
return transitiveDependencies(package).any((dep) { |
var depId = lockFile.packages[dep.name]; |
@@ -135,7 +134,7 @@ class PackageGraph { |
// mutable. |
if (depId == null) return true; |
- return entrypoint.cache.sources[depId.source] is! CachedSource; |
+ return entrypoint.cache.source(depId.source) is! CachedSource; |
}); |
} |
@@ -150,10 +149,7 @@ class PackageGraph { |
bool isPackageStatic(String package) { |
var id = lockFile.packages[package]; |
if (id == null) return false; |
- |
- var source = entrypoint.cache.sources[id.source]; |
- if (source is! CachedSource) return false; |
- |
+ if (entrypoint.cache.source(id.source) is! CachedSource) return false; |
return packages[package].pubspec.transformers.isEmpty; |
} |
} |