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

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

Issue 16854005: First pass at build dependency graph for barback. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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
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 f72f173477200a9a2b61b4a8d445d89fdff203f9..bc075ad6f13dc519937cd5c1e30518d734648465 100644
--- a/sdk/lib/_internal/pub/lib/src/source.dart
+++ b/sdk/lib/_internal/pub/lib/src/source.dart
@@ -184,6 +184,14 @@ abstract class Source {
return false;
}
+ /// Returns the directory where this package has been installed. If this is
+ /// a cached source, it will be in the system cache. Otherwise, it will
+ /// depend on the source.
+ Future<String> getDirectory(PackageId id) {
+ if (shouldCache) return systemCacheDirectory(id);
+ throw new UnimplementedError("Source $name must implement this.");
+ }
+
/// Returns the directory in the system cache that the package identified by
/// [id] should be installed to. This should return a path to a subdirectory
/// of [systemCacheRoot].

Powered by Google App Engine
This is Rietveld 408576698