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

Unified Diff: sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart

Issue 334363004: Gracefully handle a missing locked version in pub get. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 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 | « no previous file | sdk/lib/_internal/pub/test/get/hosted/unlock_if_version_doesnt_exist_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart
diff --git a/sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart b/sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart
index a1195a66f431e11d0c2c00aa88d142dbced86787..1944eb0135790b50a5754be5f1553031caaaeff5 100644
--- a/sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart
+++ b/sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart
@@ -487,6 +487,12 @@ class Traverser {
}
return _traverseDeps(id, new DependencyQueue(_solver, deps));
+ }).catchError((error) {
+ if (error is! PackageNotFoundException) throw error;
+
+ // We can only get here if the lockfile refers to a specific package
+ // version that doesn't exist (probably because it was yanked).
+ throw new NoVersionException(id.name, null, id.version, []);
});
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/test/get/hosted/unlock_if_version_doesnt_exist_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698