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

Unified Diff: utils/pub/sdk_source.dart

Issue 10690127: Add support to the version solver for sources that only have a single version per package. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 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: utils/pub/sdk_source.dart
diff --git a/utils/pub/sdk_source.dart b/utils/pub/sdk_source.dart
index ef79fdcf690c11622ecc45afb40e2d2947402859..3662f853fa4530280307cbfe9e5b2369fb43aa6c 100644
--- a/utils/pub/sdk_source.dart
+++ b/utils/pub/sdk_source.dart
@@ -27,6 +27,15 @@ class SdkSource extends Source {
SdkSource(this.rootDir);
/**
+ * An SDK package has no dependencies. Its version number is inferred from the
+ * revision number of the SDK itself.
+ */
+ Future<Pubspec> describe(PackageId id) {
+ return readTextFile(join(rootDir, "revision")).transform((revision) =>
+ new Pubspec("0.0.0-r.${revision.trim()}", <PackageRef>[]));
+ }
+
+ /**
* Since all the SDK files are already available locally, installation just
* involves symlinking the SDK library into the packages directory.
*/

Powered by Google App Engine
This is Rietveld 408576698