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(), |