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

Unified Diff: utils/pub/entrypoint.dart

Issue 12280019: Revert "Support relative paths in path dependencies." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « no previous file | utils/pub/git_source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/entrypoint.dart
diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart
index 9f02e4e6aebd5ee607f347cbbcbdbe980e459432..054541d4e303a0967a33e5b88bbb17d38b128cf2 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -82,7 +82,7 @@ class Entrypoint {
}).then((_) {
if (id.source.shouldCache) {
return cache.install(id).then(
- (pkg) => createPackageSymlink(id.name, packageDir, pkg.dir));
+ (pkg) => createPackageSymlink(id.name, pkg.dir, packageDir));
} else {
return id.source.install(id, packageDir).then((found) {
if (found) return null;
@@ -209,7 +209,7 @@ class Entrypoint {
LockFile loadLockFile() {
var lockFilePath = path.join(root.dir, 'pubspec.lock');
if (!fileExists(lockFilePath)) return new LockFile.empty();
- return new LockFile.load(lockFilePath, cache.sources);
+ return new LockFile.parse(readTextFile(lockFilePath), cache.sources);
}
/// Saves a list of concrete package versions to the `pubspec.lock` file.
@@ -231,7 +231,7 @@ class Entrypoint {
// Create the symlink if it doesn't exist.
if (entryExists(linkPath)) return;
ensureDir(packagesDir);
- return createPackageSymlink(root.name, linkPath, root.dir,
+ return createPackageSymlink(root.name, root.dir, linkPath,
isSelfLink: true);
});
}
@@ -294,9 +294,9 @@ class Entrypoint {
/// Creates a symlink to the `packages` directory in [dir] if none exists.
Future _linkSecondaryPackageDir(String dir) {
return defer(() {
- var symlink = path.join(dir, 'packages');
- if (entryExists(symlink)) return;
- return createSymlink(packagesDir, symlink);
+ var to = path.join(dir, 'packages');
+ if (entryExists(to)) return;
+ return createSymlink(packagesDir, to);
});
}
}
« no previous file with comments | « no previous file | utils/pub/git_source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698