Index: utils/pub/sdk_source.dart |
diff --git a/utils/pub/sdk_source.dart b/utils/pub/sdk_source.dart |
index 3662f853fa4530280307cbfe9e5b2369fb43aa6c..3ca8effc422930ef96325ca54f17de82ce269405 100644 |
--- a/utils/pub/sdk_source.dart |
+++ b/utils/pub/sdk_source.dart |
@@ -6,7 +6,9 @@ |
#import('io.dart'); |
#import('package.dart'); |
+#import('pubspec.dart'); |
#import('source.dart'); |
+#import('version.dart'); |
/** |
* A package source that uses libraries from the Dart SDK. |
@@ -31,8 +33,10 @@ class SdkSource extends Source { |
* 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>[])); |
+ return readTextFile(join(rootDir, "revision")).transform((revision) { |
+ var version = new Version.parse("0.0.0-r.${revision.trim()}"); |
+ return new Pubspec(version, <PackageRef>[]); |
+ }); |
} |
/** |