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

Unified Diff: lib/src/command/cache_add.dart

Issue 1459733002: Move pubspec caching into each source. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years, 1 month 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 | « no previous file | lib/src/solver/backtracking_solver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/command/cache_add.dart
diff --git a/lib/src/command/cache_add.dart b/lib/src/command/cache_add.dart
index 7958d27dfb51986488b4dd513821b131b4fe253c..d39fe96e12d691c778b8d4e324f867f4e1428668 100644
--- a/lib/src/command/cache_add.dart
+++ b/lib/src/command/cache_add.dart
@@ -59,8 +59,9 @@ class CacheAddCommand extends PubCommand {
var source = cache.sources["hosted"];
// TODO(rnystrom): Allow specifying the server.
- var pubspecs = await source.getVersions(package, package);
- var versions = pubspecs.map((pubspec) => pubspec.version)
+ var ids = await source.getVersions(
+ new PackageRef(package, 'hosted', package));
+ var versions = ids.map((id) => id.version)
.where(constraint.allows).toList();
if (versions.isEmpty) {
« no previous file with comments | « no previous file | lib/src/solver/backtracking_solver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698