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

Unified Diff: sdk/lib/_internal/pub_generated/lib/src/lock_file.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
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/io.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/log.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub_generated/lib/src/lock_file.dart
diff --git a/sdk/lib/_internal/pub/lib/src/lock_file.dart b/sdk/lib/_internal/pub_generated/lib/src/lock_file.dart
similarity index 78%
copy from sdk/lib/_internal/pub/lib/src/lock_file.dart
copy to sdk/lib/_internal/pub_generated/lib/src/lock_file.dart
index 99b233276294f5baeeffa3de32bbfadd9b67f9da..fa964c70f803c727c63f53ef171d8ed8ff06630f 100644
--- a/sdk/lib/_internal/pub/lib/src/lock_file.dart
+++ b/sdk/lib/_internal/pub_generated/lib/src/lock_file.dart
@@ -32,7 +32,7 @@ class LockFile {
LockFile._(this.packages);
LockFile.empty()
- : packages = <String, PackageId>{};
+ : packages = <String, PackageId>{};
/// Loads a lockfile from [filePath].
factory LockFile.load(String filePath, SourceRegistry sources) {
@@ -62,39 +62,50 @@ class LockFile {
var packageEntries = parsed['packages'];
if (packageEntries != null) {
- _validate(packageEntries is Map, 'The "packages" field must be a map.',
+ _validate(
+ packageEntries is Map,
+ 'The "packages" field must be a map.',
parsed.nodes['packages']);
packageEntries.forEach((name, spec) {
// Parse the version.
- _validate(spec.containsKey('version'),
- 'Package $name is missing a version.', spec);
+ _validate(
+ spec.containsKey('version'),
+ 'Package $name is missing a version.',
+ spec);
var version = new Version.parse(spec['version']);
// Parse the source.
- _validate(spec.containsKey('source'),
- 'Package $name is missing a source.', spec);
+ _validate(
+ spec.containsKey('source'),
+ 'Package $name is missing a source.',
+ spec);
var sourceName = spec['source'];
- _validate(spec.containsKey('description'),
- 'Package $name is missing a description.', spec);
+ _validate(
+ spec.containsKey('description'),
+ 'Package $name is missing a description.',
+ spec);
var description = spec['description'];
// Let the source parse the description.
var source = sources[sourceName];
try {
- description = source.parseDescription(filePath, description,
- fromLockFile: true);
+ description =
+ source.parseDescription(filePath, description, fromLockFile: true);
} on FormatException catch (ex) {
- throw new SourceSpanFormatException(ex.message,
+ throw new SourceSpanFormatException(
+ ex.message,
spec.nodes['source'].span);
}
var id = new PackageId(name, sourceName, version, description);
// Validate the name.
- _validate(name == id.name,
- "Package name $name doesn't match ${id.name}.", spec);
+ _validate(
+ name == id.name,
+ "Package name $name doesn't match ${id.name}.",
+ spec);
packages[name] = id;
});
@@ -117,8 +128,8 @@ class LockFile {
// Convert the dependencies to a simple object.
var data = {};
packages.forEach((name, package) {
- var description = sources[package.source].serializeDescription(packageDir,
- package.description);
+ var description =
+ sources[package.source].serializeDescription(packageDir, package.description);
data[name] = {
'version': package.version.toString(),
« no previous file with comments | « sdk/lib/_internal/pub_generated/lib/src/io.dart ('k') | sdk/lib/_internal/pub_generated/lib/src/log.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698