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

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

Issue 342763003: Show partial reports in pub get, serve, and build. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. 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
Index: sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
diff --git a/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart b/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
index 99ae3a2ddb8beaac6f15042f3186ac5470d64167..4c18768713a77ee8a4f5ac2682cec16dced04d95 100644
--- a/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
+++ b/sdk/lib/_internal/pub/lib/src/solver/version_solver.dart
@@ -17,7 +17,7 @@ import '../source_registry.dart';
import '../version.dart';
import '../utils.dart';
import 'backtracking_solver.dart';
-import 'solve_report.dart' as solve_report;
+import 'solve_report.dart';
/// Attempts to select the best concrete versions for all of the transitive
/// dependencies of [root] taking into account all of the [VersionConstraint]s
@@ -86,13 +86,21 @@ class SolveResult {
/// Displays a report of what changes were made to the lockfile.
///
- /// If [showAll] is true, displays all new and previous dependencies.
- /// Otherwise, just shows a warning for any overrides in effect.
+ /// If [isUpgrade] is true, a "pub upgrade" was run, otherwise it was another
+ /// command.
+ void showReport({bool isUpgrade: false}) {
+ new SolveReport(_sources, _root, _previousLockFile, this,
+ showAll: isUpgrade).show();
+ }
+
+ /// Displays a one-line message summarizing what changes were made (or would
+ /// be made) to the lockfile.
///
- /// Returns the number of changed (added, removed, or modified) dependencies.
- int showReport({bool showAll: false}) {
- return solve_report.show(_sources, _root, _previousLockFile, this,
- showAll: showAll);
+ /// If [isUpgrade] is true, a "pub upgrade" was run, otherwise it was another
+ /// command.
+ void summarizeChanges({bool isUpgrade: false, bool dryRun: false}) {
+ new SolveReport(_sources, _root, _previousLockFile, this,
+ showAll: isUpgrade).summarize(dryRun: dryRun);
}
String toString() {

Powered by Google App Engine
This is Rietveld 408576698