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

Unified Diff: sdk/lib/_internal/pub/lib/src/source/cached.dart

Issue 357483004: Split installing a package locally from symlinking to it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise! Created 6 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 | « sdk/lib/_internal/pub/lib/src/source.dart ('k') | sdk/lib/_internal/pub/lib/src/source/git.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/source/cached.dart
diff --git a/sdk/lib/_internal/pub/lib/src/source/cached.dart b/sdk/lib/_internal/pub/lib/src/source/cached.dart
index 4fada96e6bb3920f6beaa30ecab62da57f2a87a8..aaafd3190a1122eff406c2a88a3081d8a67ff0a1 100644
--- a/sdk/lib/_internal/pub/lib/src/source/cached.dart
+++ b/sdk/lib/_internal/pub/lib/src/source/cached.dart
@@ -47,9 +47,14 @@ abstract class CachedSource extends Source {
/// the system cache.
Future<Pubspec> describeUncached(PackageId id);
- Future get(PackageId id, String packageDir) {
- return downloadToSystemCache(id).then(
- (pkg) => createPackageSymlink(id.name, pkg.dir, packageDir));
+ Future ensureLocal(PackageId id) {
+ return downloadToSystemCache(id);
+ }
+
+ Future get(PackageId id, String symlink) {
+ return downloadToSystemCache(id).then((pkg) {
+ createPackageSymlink(id.name, pkg.dir, symlink);
+ });
}
/// Determines if the package with [id] is already downloaded to the system
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/source.dart ('k') | sdk/lib/_internal/pub/lib/src/source/git.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698