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

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

Issue 1113363004: Cache pubspecs when HostedSource.getVersions is called. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 5 years, 7 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 7affb689ab1454f1c7aeaedcdaaee2584d818a09..85218d349791722d4552b8c3c3eafa9298dd3338 100644
--- a/sdk/lib/_internal/pub/lib/src/source.dart
+++ b/sdk/lib/_internal/pub/lib/src/source.dart
@@ -57,7 +57,7 @@ abstract class Source {
this._systemCache = systemCache;
}
- /// Get the list of all versions that exist for the package described by
+ /// Get the pubspecs of all versions that exist for the package described by
/// [description].
///
/// [name] is the expected name of the package.
@@ -69,9 +69,9 @@ abstract class Source {
///
/// By default, this assumes that each description has a single version and
/// uses [describe] to get that version.
- Future<List<Version>> getVersions(String name, description) {
+ Future<List<Pubspec>> getVersions(String name, description) async {
var id = new PackageId(name, this.name, Version.none, description);
- return describe(id).then((pubspec) => [pubspec.version]);
+ return [await describe(id)];
}
/// Loads the (possibly remote) pubspec for the package version identified by
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/solver/version_solver.dart ('k') | sdk/lib/_internal/pub/lib/src/source/hosted.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698