Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1123)

Unified Diff: lib/src/lock_file.dart

Issue 2044253003: Refactor Source and SourceRegistry. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Rename LiveSource to BoundSource. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/global_packages.dart ('k') | lib/src/package_graph.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/lock_file.dart
diff --git a/lib/src/lock_file.dart b/lib/src/lock_file.dart
index 7810bad1ddfcb60f447aa81339ad2e337092df4b..c5ac4b43885fc1b92bd3c6ffd6db132f87baaee6 100644
--- a/lib/src/lock_file.dart
+++ b/lib/src/lock_file.dart
@@ -13,6 +13,7 @@ import 'package:yaml/yaml.dart';
import 'io.dart';
import 'package.dart';
import 'source_registry.dart';
+import 'system_cache.dart';
import 'utils.dart';
/// A parsed and validated `pubspec.lock` file.
@@ -175,12 +176,12 @@ class LockFile {
///
/// If [entrypoint] is passed, a relative entry is added for its "lib/"
/// directory.
- String packagesFile([String entrypoint]) {
+ String packagesFile(SystemCache cache, [String entrypoint]) {
var header = "Generated by pub on ${new DateTime.now()}.";
var map = new Map.fromIterable(ordered(packages.keys), value: (name) {
var id = packages[name];
- var source = _sources[id.source];
+ var source = cache.source(id.source);
return p.toUri(p.join(source.getDirectory(id), "lib"));
});
« no previous file with comments | « lib/src/global_packages.dart ('k') | lib/src/package_graph.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698