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

Unified Diff: utils/pub/package.dart

Issue 12092080: Validate packages against their SDK constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. Created 7 years, 11 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 | « utils/pub/io.dart ('k') | utils/pub/pubspec.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/package.dart
diff --git a/utils/pub/package.dart b/utils/pub/package.dart
index 15fcb97b65874279b40ab650285091dcb6ba299e..72c5c0e19c77476b616d4bcb8a48ed9034e95100 100644
--- a/utils/pub/package.dart
+++ b/utils/pub/package.dart
@@ -58,7 +58,7 @@ class Package {
/// The ids of the packages that this package depends on. This is what is
/// specified in the pubspec when this package depends on another.
- Collection<PackageRef> get dependencies => pubspec.dependencies;
+ List<PackageRef> get dependencies => pubspec.dependencies;
/// Returns the path to the README file at the root of the entrypoint, or null
/// if no README file is found. If multiple READMEs are found, this uses the
@@ -124,6 +124,10 @@ class PackageId implements Comparable {
int get hashCode => name.hashCode ^ source.hashCode ^ version.hashCode;
+ /// Gets the directory where this package is or would be found in the
+ /// [SystemCache].
+ Future<String> get systemCacheDirectory => source.systemCacheDirectory(this);
+
bool operator ==(other) {
if (other is! PackageId) return false;
// TODO(rnystrom): We're assuming here the name/version/source tuple is
« no previous file with comments | « utils/pub/io.dart ('k') | utils/pub/pubspec.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698