| Index: utils/pub/lock_file.dart
|
| diff --git a/utils/pub/lock_file.dart b/utils/pub/lock_file.dart
|
| index 594e523d357641cf24a96418e556f147e427e909..23e709993e18d1bb8499f3ba5844b6364f9e214e 100644
|
| --- a/utils/pub/lock_file.dart
|
| +++ b/utils/pub/lock_file.dart
|
| @@ -5,7 +5,6 @@
|
| library lock_file;
|
|
|
| import 'dart:json' as json;
|
| -import 'io.dart';
|
| import 'package.dart';
|
| import 'source_registry.dart';
|
| import 'utils.dart';
|
| @@ -22,19 +21,8 @@ class LockFile {
|
| LockFile.empty()
|
| : packages = <String, PackageId>{};
|
|
|
| - /// Loads a lockfile from [filePath].
|
| - factory LockFile.load(String filePath, SourceRegistry sources) {
|
| - return LockFile._parse(filePath, readTextFile(filePath), sources);
|
| - }
|
| -
|
| - /// Parses a lockfile whose text is [contents].
|
| - factory LockFile.parse(String contents, SourceRegistry sources) {
|
| - return LockFile._parse(null, contents, sources);
|
| - }
|
| -
|
| /// Parses the lockfile whose text is [contents].
|
| - static LockFile _parse(String filePath, String contents,
|
| - SourceRegistry sources) {
|
| + factory LockFile.parse(String contents, SourceRegistry sources) {
|
| var packages = <String, PackageId>{};
|
|
|
| if (contents.trim() == '') return new LockFile.empty();
|
| @@ -66,8 +54,7 @@ class LockFile {
|
| throw new FormatException('Package $name is missing a description.');
|
| }
|
| var description = spec['description'];
|
| - description = source.parseDescription(filePath, description,
|
| - fromLockFile: true);
|
| + source.validateDescription(description, fromLockFile: true);
|
|
|
| var id = new PackageId(name, source, version, description);
|
|
|
|
|