Skip to content

Commit 4316601

Browse files
stereotype441commit-bot@chromium.org
authored andcommitted
Nomenclature fix: migration diff output is not a summary.
The output the migration tool generates when the web preview is disabled shows a complete diff of all changes the tool will make, so it's really a misnomer to call it a "summary". Change-Id: I8c7d9f9870bf8beffb62f1d10d36a65b66c32657 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168381 Reviewed-by: Samuel Rawlins <srawlins@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
1 parent 48c73d8 commit 4316601

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/nnbd_migration/lib/migration_cli.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -808,9 +808,9 @@ When finished with the preview, hit ctrl-c to terminate this process.
808808
await blockUntilSignalInterrupt();
809809
nonNullableFix.shutdownServer();
810810
} else {
811-
logger.stdout(ansi.emphasized('Summary of changes:'));
811+
logger.stdout(ansi.emphasized('Diff of changes:'));
812812

813-
_displayChangeSummary(_dartFixListener);
813+
_displayChangeDiff(_dartFixListener);
814814

815815
logger.stdout('');
816816
logger.stdout('To apply these changes, re-run the tool with '
@@ -879,7 +879,7 @@ When finished with the preview, hit ctrl-c to terminate this process.
879879
}
880880
}
881881

882-
void _displayChangeSummary(DartFixListener migrationResults) {
882+
void _displayChangeDiff(DartFixListener migrationResults) {
883883
Map<String, List<DartFixSuggestion>> fileSuggestions = {};
884884
for (DartFixSuggestion suggestion in migrationResults.suggestions) {
885885
String file = suggestion.location.file;

pkg/nnbd_migration/test/migration_cli_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -999,7 +999,7 @@ int? f() => null
999999
assertNormalExit(cliRunner);
10001000
// Check that a summary was printed
10011001
var output = logger.stdoutBuffer.toString();
1002-
expect(output, contains('Summary'));
1002+
expect(output, contains('Diff of changes'));
10031003
// And that it refers to test.dart and pubspec.yaml
10041004
expect(output, contains('test.dart'));
10051005
expect(output, contains('pubspec.yaml'));

0 commit comments

Comments
 (0)