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

Unified Diff: test/test_pub.dart

Issue 2079303003: Track Source objects in PackageNames. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 4 years, 6 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 | « test/pubspec_test.dart ('k') | test/version_solver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_pub.dart
diff --git a/test/test_pub.dart b/test/test_pub.dart
index cd72413a815ea1ca8b3621065db2ad7824c056c9..6c2dd68066477f2a1b67c52d45c84996ba19514b 100644
--- a/test/test_pub.dart
+++ b/test/test_pub.dart
@@ -25,7 +25,6 @@ import 'package:pub/src/http.dart';
import 'package:pub/src/io.dart';
import 'package:pub/src/lock_file.dart';
import 'package:pub/src/log.dart' as log;
-import 'package:pub/src/package.dart';
import 'package:pub/src/source_registry.dart';
import 'package:pub/src/system_cache.dart';
import 'package:pub/src/utils.dart';
@@ -523,20 +522,17 @@ LockFile _createLockFile(SourceRegistry sources, {Iterable<String> sandbox,
var packages = dependencies.keys.map((name) {
var dependencyPath = dependencies[name];
- return new PackageId(name, 'path', new Version(0, 0, 0), {
- 'path': dependencyPath,
- 'relative': p.isRelative(dependencyPath)
- });
+ return sources.path.idFor(name, new Version(0, 0, 0), dependencyPath);
}).toList();
if (hosted != null) {
hosted.forEach((name, version) {
- var id = new PackageId(name, 'hosted', new Version.parse(version), name);
+ var id = sources.hosted.idFor(name, new Version.parse(version));
packages.add(id);
});
}
- return new LockFile(packages, sources);
+ return new LockFile(packages);
}
/// Returns the path to the version of [package] used by pub.
« no previous file with comments | « test/pubspec_test.dart ('k') | test/version_solver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698