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

Unified Diff: utils/pub/entrypoint.dart

Issue 13095015: Use backtracking when solving dependency constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Allow both solvers to coexist. Created 7 years, 9 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/log.dart » ('j') | utils/pub/version_solver.dart » ('J')
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 2b02f02ff19e79fec598def618fea8fbe6fea055..a3bfc502f50db2310f6e45a214056cef146a458c 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -103,7 +103,7 @@ class Entrypoint {
/// completes when all dependencies are installed.
Future installDependencies() {
return defer(() {
- return resolveVersions(cache.sources, root, loadLockFile());
+ return resolveVersions(cache.sources, root, lockFile: loadLockFile());
}).then(_installDependencies);
}
@@ -111,8 +111,7 @@ class Entrypoint {
/// package to its "package" directory, writing a new [LockFile]. Returns a
/// [Future] that completes when all dependencies are installed.
Future updateAllDependencies() {
- return resolveVersions(cache.sources, root, new LockFile.empty())
- .then(_installDependencies);
+ return resolveVersions(cache.sources, root).then(_installDependencies);
}
/// Installs the latest available versions of [dependencies], while leaving
@@ -120,11 +119,8 @@ class Entrypoint {
/// [Future] that completes when all dependencies are installed.
Future updateDependencies(List<String> dependencies) {
return defer(() {
- var solver = new VersionSolver(cache.sources, root, loadLockFile());
- for (var dependency in dependencies) {
- solver.useLatestVersion(dependency);
- }
- return solver.solve();
+ return resolveVersions(cache.sources, root,
+ lockFile: loadLockFile(), useLatest: dependencies);
}).then(_installDependencies);
}
« no previous file with comments | « no previous file | utils/pub/log.dart » ('j') | utils/pub/version_solver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698