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

Unified Diff: sdk/lib/_internal/pub/lib/src/source.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/entrypoint.dart ('k') | sdk/lib/_internal/pub/lib/src/source/cached.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.dart
diff --git a/sdk/lib/_internal/pub/lib/src/source.dart b/sdk/lib/_internal/pub/lib/src/source.dart
index 8cfec0ff8d7bf4caa8aa4bb7660e95cfe02b0670..823b86023d7df38b36bf2a623661670137d8da3f 100644
--- a/sdk/lib/_internal/pub/lib/src/source.dart
+++ b/sdk/lib/_internal/pub/lib/src/source.dart
@@ -94,11 +94,17 @@ abstract class Source {
/// external code should not call this. Instead, call [describe].
Future<Pubspec> doDescribe(PackageId id);
- /// Gets the package identified by [id] and places it at [path].
+ /// Ensures that the package identified by [id] is present on the local file
+ /// system.
///
- /// Returns a [Future] that completes when the operation finishes. [path] is
- /// guaranteed not to exist, and its parent directory is guaranteed to exist.
- Future get(PackageId id, String path);
+ /// For cached sources, this ensures the package is in the system cache. (If
+ /// already cached, it does nothing.) For uncached sources, it does nothing
+ /// since the package is already local.
+ Future ensureLocal(PackageId id);
+
+ /// Ensures [id] is available locally and creates a symlink at [symlink]
+ /// pointing it.
+ Future get(PackageId id, String symlink);
/// Returns the directory where this package can (or could) be found locally.
///
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/entrypoint.dart ('k') | sdk/lib/_internal/pub/lib/src/source/cached.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698