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

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

Issue 172873006: Add a little additional logging to pub's version solver. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 10 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 | no next file » | 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 6229c6e47f5c5d04d4fa6aff8224a362df922b4b..c570b62b581f8989a1f0c8c507d09421ff667a04 100644
--- a/sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart
+++ b/sdk/lib/_internal/pub/lib/src/solver/backtracking_solver.dart
@@ -402,14 +402,12 @@ class BacktrackingSolver {
}
} else {
// Otherwise, indent it under the current selected package.
- message = "| $message";
+ message = prefixLines(message);
}
// Indent for the previous selections.
- var buffer = new StringBuffer();
- buffer.writeAll(_selected.skip(1).map((_) => '| '));
- buffer.write(message);
- log.solver(buffer);
+ var prefix = _selected.skip(1).map((_) => '| ').join();
+ log.solver(prefixLines(message, prefix: prefix));
}
}
@@ -545,7 +543,11 @@ class Traverser {
// See if it's possible for a package to match that constraint.
if (constraint.isEmpty) {
- _solver.logSolve('disjoint constraints on ${dep.name}');
+ var constraints = _getDependencies(dep.name)
+ .map((dep) => " ${dep.dep.constraint} from ${dep.depender}")
+ .join('\n');
+ _solver.logSolve(
+ 'disjoint constraints on ${dep.name}:\n$constraints');
throw new DisjointConstraintException(dep.name, dependencies);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698