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

Unified Diff: utils/pub/entrypoint.dart

Issue 11635060: Add a validator for dependency version constraints. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 8 years 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/http.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 56007e0fe78dd90ab32c0a88af95cdaae972a4be..3f3a57fd08709345d2245f210dfb14825a8c8d2b 100644
--- a/utils/pub/entrypoint.dart
+++ b/utils/pub/entrypoint.dart
@@ -114,7 +114,7 @@ class Entrypoint {
* completes when all dependencies are installed.
*/
Future installDependencies() {
- return _loadLockFile()
+ return loadLockFile()
.chain((lockFile) => resolveVersions(cache.sources, root, lockFile))
.chain(_installDependencies);
}
@@ -135,7 +135,7 @@ class Entrypoint {
* [Future] that completes when all dependencies are installed.
*/
Future updateDependencies(List<String> dependencies) {
- return _loadLockFile().chain((lockFile) {
+ return loadLockFile().chain((lockFile) {
var versionSolver = new VersionSolver(cache.sources, root, lockFile);
for (var dependency in dependencies) {
versionSolver.useLatestVersion(dependency);
@@ -159,14 +159,9 @@ class Entrypoint {
.chain(_linkSecondaryPackageDirs);
}
- /**
- * Loads the list of concrete package versions from the `pubspec.lock`, if it
- * exists. If it doesn't, this completes to an empty [LockFile].
- *
- * If there's an error reading the `pubspec.lock` file, this will print a
- * warning message and act as though the file doesn't exist.
- */
- Future<LockFile> _loadLockFile() {
+ /// Loads the list of concrete package versions from the `pubspec.lock`, if it
+ /// exists. If it doesn't, this completes to an empty [LockFile].
+ Future<LockFile> loadLockFile() {
var lockFilePath = join(root.dir, 'pubspec.lock');
log.fine("Loading lockfile.");
« no previous file with comments | « no previous file | utils/pub/http.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698