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

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

Issue 130293002: Revert "Fix version_negotiation_test timing out." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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/pub.status » ('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/dependency_queue.dart
diff --git a/sdk/lib/_internal/pub/lib/src/solver/dependency_queue.dart b/sdk/lib/_internal/pub/lib/src/solver/dependency_queue.dart
index 42ca2992daf9380342662058dd87802a6e7ae8a1..c462120575050fbbd1c10ad7c171cb02e1ea51bc 100644
--- a/sdk/lib/_internal/pub/lib/src/solver/dependency_queue.dart
+++ b/sdk/lib/_internal/pub/lib/src/solver/dependency_queue.dart
@@ -125,9 +125,18 @@ class DependencyQueue {
/// versions available for it.
Future<int> _getNumVersions(PackageDep dep) {
// There is only ever one version of the root package.
- if (dep.isRoot) return new Future.value(1);
+ if (dep.isRoot) {
+ return new Future.value(1);
+ }
- return _solver.cache.getVersions(dep.toRef())
- .then((versions) => versions.length);
+ return _solver.cache.getVersions(dep.toRef()).then((versions) {
+ return versions.length;
+ }).catchError((error, trace) {
+ // If it fails for any reason, just treat that as no versions. This
+ // will sort this reference higher so that we can traverse into it
+ // and report the error more properly.
+ log.solver("Could not get versions for $dep:\n$error\n\n$trace");
+ return 0;
+ });
}
}
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/pub.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698