| Index: lib/src/source/path.dart
|
| diff --git a/lib/src/source/path.dart b/lib/src/source/path.dart
|
| index b239c5327953d316c963c588d235adcc2a77607b..9eae3cbd451f5d148eb5a5b9db32530447e46192 100644
|
| --- a/lib/src/source/path.dart
|
| +++ b/lib/src/source/path.dart
|
| @@ -31,7 +31,7 @@ class PathSource extends Source {
|
|
|
| /// Returns a reference to a path package named [name] at [path].
|
| PackageRef refFor(String name, String path) {
|
| - return new PackageRef(name, 'path', {
|
| + return new PackageRef(name, this, {
|
| "path": path,
|
| "relative": p.isRelative(path)
|
| });
|
| @@ -40,7 +40,7 @@ class PathSource extends Source {
|
| /// Returns an ID for a path package with the given [name] and [version] at
|
| /// [path].
|
| PackageId idFor(String name, Version version, String path) {
|
| - return new PackageId(name, 'path', version, {
|
| + return new PackageId(name, this, version, {
|
| "path": path,
|
| "relative": p.isRelative(path)
|
| });
|
| @@ -53,6 +53,9 @@ class PathSource extends Source {
|
| return path1 == path2;
|
| }
|
|
|
| + int hashDescription(description) =>
|
| + canonicalize(description["path"]).hashCode;
|
| +
|
| /// Parses a path dependency.
|
| ///
|
| /// This takes in a path string and returns a map. The "path" key will be the
|
| @@ -79,7 +82,7 @@ class PathSource extends Source {
|
| p.join(p.dirname(containingPath), description));
|
| }
|
|
|
| - return new PackageRef(name, this.name, {
|
| + return new PackageRef(name, this, {
|
| "path": description,
|
| "relative": isRelative
|
| });
|
| @@ -100,7 +103,7 @@ class PathSource extends Source {
|
| "must be a boolean.");
|
| }
|
|
|
| - return new PackageId(name, this.name, version, description);
|
| + return new PackageId(name, this, version, description);
|
| }
|
|
|
| /// Serializes path dependency's [description].
|
| @@ -140,8 +143,7 @@ class BoundPathSource extends BoundSource {
|
| // There's only one package ID for a given path. We just need to find the
|
| // version.
|
| var pubspec = _loadPubspec(ref);
|
| - var id = new PackageId(
|
| - ref.name, source.name, pubspec.version, ref.description);
|
| + var id = new PackageId(ref.name, source, pubspec.version, ref.description);
|
| memoizePubspec(id, pubspec);
|
| return [id];
|
| }
|
|
|