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

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

Issue 887223007: Revert "Use native async/await support in pub." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/path.dart
diff --git a/sdk/lib/_internal/pub/lib/src/source/path.dart b/sdk/lib/_internal/pub_generated/lib/src/source/path.dart
similarity index 85%
copy from sdk/lib/_internal/pub/lib/src/source/path.dart
copy to sdk/lib/_internal/pub_generated/lib/src/source/path.dart
index 8786968a81df58f3662b0724855cad6ce15f9694..d6f7b8c0c70a9ce04e576216835edb1cc805533e 100644
--- a/sdk/lib/_internal/pub/lib/src/source/path.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/source/path.dart
@@ -37,8 +37,7 @@ class PathSource extends Source {
Future<Pubspec> doDescribe(PackageId id) {
return new Future.sync(() {
var dir = _validatePath(id.name, id.description);
- return new Pubspec.load(dir, systemCache.sources,
- expectedName: id.name);
+ return new Pubspec.load(dir, systemCache.sources, expectedName: id.name);
});
}
@@ -52,7 +51,10 @@ class PathSource extends Source {
Future get(PackageId id, String symlink) {
return new Future.sync(() {
var dir = _validatePath(id.name, id.description);
- createPackageSymlink(id.name, dir, symlink,
+ createPackageSymlink(
+ id.name,
+ dir,
+ symlink,
relative: id.description["relative"]);
});
}
@@ -69,20 +71,20 @@ class PathSource extends Source {
/// A path coming from a pubspec is a simple string. From a lock file, it's
/// an expanded {"path": ..., "relative": ...} map.
dynamic parseDescription(String containingPath, description,
- {bool fromLockFile: false}) {
+ {bool fromLockFile: false}) {
if (fromLockFile) {
if (description is! Map) {
throw new FormatException("The description must be a map.");
}
if (description["path"] is! String) {
- throw new FormatException("The 'path' field of the description must "
- "be a string.");
+ throw new FormatException(
+ "The 'path' field of the description must " "be a string.");
}
if (description["relative"] is! bool) {
- throw new FormatException("The 'relative' field of the description "
- "must be a boolean.");
+ throw new FormatException(
+ "The 'relative' field of the description " "must be a boolean.");
}
return description;
@@ -100,12 +102,11 @@ class PathSource extends Source {
// system aren't allowed. This can happen if a hosted or git dependency
// has a path dependency.
if (containingPath == null) {
- throw new FormatException('"$description" is a relative path, but this '
- 'isn\'t a local pubspec.');
+ throw new FormatException(
+ '"$description" is a relative path, but this ' 'isn\'t a local pubspec.');
}
- description = p.normalize(
- p.join(p.dirname(containingPath), description));
+ description = p.normalize(p.join(p.dirname(containingPath), description));
}
return {
@@ -150,8 +151,9 @@ class PathSource extends Source {
if (dirExists(dir)) return dir;
if (fileExists(dir)) {
- fail('Path dependency for package $name must refer to a directory, '
- 'not a file. Was "$dir".');
+ fail(
+ 'Path dependency for package $name must refer to a directory, '
+ 'not a file. Was "$dir".');
}
throw new PackageNotFoundException(

Powered by Google App Engine
This is Rietveld 408576698