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

Unified Diff: utils/pub/entrypoint.dart

Issue 10854152: Allow `pub install` and `pub update` to update dependers. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Minor changes Created 8 years, 4 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/version_solver.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 d3f79beca41923a4006129aa927716c7b5b4bbe4..7cff3594e603f46fb8a969badf273f067d57c811 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -123,17 +123,16 @@ class Entrypoint {
/**
* Installs the latest available versions of [dependencies], while leaving
- * other dependencies as specified by the [LockFile]. Returns a [Future] that
- * completes when all dependencies are installed.
+ * other dependencies as specified by the [LockFile] if possible. Returns a
+ * [Future] that completes when all dependencies are installed.
*/
Future updateDependencies(List<String> dependencies) {
return _loadLockFile().chain((lockFile) {
+ var versionSolver = new VersionSolver(cache.sources, root, lockFile);
for (var dependency in dependencies) {
- // TODO(nweiz): How do we want to detect and handle unknown
- // dependencies here?
- lockFile.packages.remove(dependency);
+ versionSolver.useBestVersion(dependency);
}
- return resolveVersions(cache.sources, root, lockFile);
+ return versionSolver.solve();
}).chain(_installDependencies);
}
« no previous file with comments | « no previous file | utils/pub/version_solver.dart » ('j') | utils/pub/version_solver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698