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

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

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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_generated/lib/src/source.dart
diff --git a/sdk/lib/_internal/pub_generated/lib/src/source.dart b/sdk/lib/_internal/pub_generated/lib/src/source.dart
new file mode 100644
index 0000000000000000000000000000000000000000..f5a33fedf496d899e3bdb8349b15255f3c1d1f04
--- /dev/null
+++ b/sdk/lib/_internal/pub_generated/lib/src/source.dart
@@ -0,0 +1,45 @@
+library pub.source;
+import 'dart:async';
+import 'package.dart';
+import 'pubspec.dart';
+import 'system_cache.dart';
+import 'version.dart';
+abstract class Source {
+ String get name;
+ final bool hasMultipleVersions = false;
+ bool get isDefault => systemCache.sources.defaultSource == this;
+ SystemCache get systemCache {
+ assert(_systemCache != null);
+ return _systemCache;
+ }
+ SystemCache _systemCache;
+ void bind(SystemCache systemCache) {
+ assert(_systemCache == null);
+ this._systemCache = systemCache;
+ }
+ Future<List<Version>> getVersions(String name, description) {
+ var id = new PackageId(name, this.name, Version.none, description);
+ return describe(id).then((pubspec) => [pubspec.version]);
+ }
+ Future<Pubspec> describe(PackageId id) {
+ if (id.isRoot) throw new ArgumentError("Cannot describe the root package.");
+ if (id.source != name) {
+ throw new ArgumentError("Package $id does not use source $name.");
+ }
+ return doDescribe(id);
+ }
+ Future<Pubspec> doDescribe(PackageId id);
+ Future get(PackageId id, String symlink);
+ Future<String> getDirectory(PackageId id);
+ dynamic parseDescription(String containingPath, description,
+ {bool fromLockFile: false});
+ dynamic serializeDescription(String containingPath, description) {
+ return description;
+ }
+ String formatDescription(String containingPath, description) {
+ return description.toString();
+ }
+ bool descriptionsEqual(description1, description2);
+ Future<PackageId> resolveId(PackageId id) => new Future.value(id);
+ String toString() => name;
+}

Powered by Google App Engine
This is Rietveld 408576698