[M] Change in dart/sdk[main]: [migrate] Print details for the fixes applied.

0 views
Skip to first unread message

Kallen Tu (Gerrit)

unread,
Jun 23, 2026, 1:45:16 PM (12 hours ago) Jun 23
to Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Brian Wilkerson

New activity on the change

Open in Gerrit

Related details

Attention is currently required from:
  • Brian Wilkerson
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ib2a74767a6e7802d6b389c7a79352aa17513605c
Gerrit-Change-Number: 516062
Gerrit-PatchSet: 2
Gerrit-Owner: Kallen Tu <kall...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Kallen Tu <kall...@google.com>
Gerrit-Attention: Brian Wilkerson <brianwi...@google.com>
Gerrit-Comment-Date: Tue, 23 Jun 2026 17:45:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: No
unsatisfied_requirement
open
diffy

Brian Wilkerson (Gerrit)

unread,
Jun 23, 2026, 1:55:42 PM (11 hours ago) Jun 23
to Kallen Tu, Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org
Attention needed from Kallen Tu

Brian Wilkerson voted and added 1 comment

Votes added by Brian Wilkerson

Code-Review+1

1 comment

File pkg/analysis_server/test/lsp/migrate_test.dart
Line 294, Patchset 2 (Latest):Pre-migration fixes:
Brian Wilkerson . resolved

This might be easier to read if the content of these top-level sections were indented.

Open in Gerrit

Related details

Attention is currently required from:
  • Kallen Tu
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ib2a74767a6e7802d6b389c7a79352aa17513605c
Gerrit-Change-Number: 516062
Gerrit-PatchSet: 2
Gerrit-Owner: Kallen Tu <kall...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Kallen Tu <kall...@google.com>
Gerrit-Attention: Kallen Tu <kall...@google.com>
Gerrit-Comment-Date: Tue, 23 Jun 2026 17:55:36 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
open
diffy

Kallen Tu (Gerrit)

unread,
Jun 23, 2026, 3:18:14 PM (10 hours ago) Jun 23
to Brian Wilkerson, dart-...@luci-project-accounts.iam.gserviceaccount.com, dart-analys...@google.com, rev...@dartlang.org

Kallen Tu voted and added 1 comment

Votes added by Kallen Tu

Commit-Queue+2

1 comment

File pkg/analysis_server/test/lsp/migrate_test.dart
Line 294, Patchset 2:Pre-migration fixes:
Brian Wilkerson . resolved

This might be easier to read if the content of these top-level sections were indented.

Kallen Tu

I do like that better, thanks.

Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement satisfiedCode-Review
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ib2a74767a6e7802d6b389c7a79352aa17513605c
Gerrit-Change-Number: 516062
Gerrit-PatchSet: 3
Gerrit-Comment-Date: Tue, 23 Jun 2026 19:18:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: Brian Wilkerson <brianwi...@google.com>
satisfied_requirement
open
diffy

dart-scoped@luci-project-accounts.iam.gserviceaccount.com (Gerrit)

unread,
Jun 23, 2026, 4:51:26 PM (9 hours ago) Jun 23
to Kallen Tu, Brian Wilkerson, dart-analys...@google.com, rev...@dartlang.org

dart-...@luci-project-accounts.iam.gserviceaccount.com submitted the change with unreviewed changes

Unreviewed changes

2 is the latest approved patch-set.
The change was submitted with unreviewed changes in the following files:

```
The name of the file: pkg/analysis_server/test/lsp/migrate_test.dart
Insertions: 54, Deletions: 54.

@@ -38,7 +38,7 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.0.0 -> ^3.1.0''',
+ - test_project: ^3.0.0 -> ^3.1.0''',
expectedEdit: '''
>>>>>>>>>> pubspec.yaml
name: test_project
@@ -77,8 +77,8 @@
uris: [Uri.file(project1Path), Uri.file(project2Path)],
expectedSummary: '''
Bumped SDK constraints in 2 package(s):
-- project1: ^3.0.0 -> ^3.1.0
-- project2: ^3.2.0 -> ^3.3.0''',
+ - project1: ^3.0.0 -> ^3.1.0
+ - project2: ^3.2.0 -> ^3.3.0''',
expectedEdit: '''
>>>>>>>>>> project1/pubspec.yaml
name: project1
@@ -289,19 +289,19 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0

Pre-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.

-my_project/lib/main.dart
- extraneous_modifier • 2 fixes
+ my_project/lib/main.dart
+ extraneous_modifier • 2 fixes

Post-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.

-my_project/lib/main.dart
- unnecessary_type_name_in_constructor • 2 fixes''',
+ my_project/lib/main.dart
+ unnecessary_type_name_in_constructor • 2 fixes''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
class C {
@@ -352,26 +352,26 @@
uris: [projectFolderUri, toUri(otherPackagePath)],
expectedSummary: '''
Bumped SDK constraints in 2 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
-- other_package: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
+ - other_package: ^3.12.0 -> ^3.13.0

Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.

-my_project/lib/main.dart
- extraneous_modifier • 1 fix
+ my_project/lib/main.dart
+ extraneous_modifier • 1 fix

-other_package/lib/other.dart
- extraneous_modifier • 1 fix
+ other_package/lib/other.dart
+ extraneous_modifier • 1 fix

Post-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.

-my_project/lib/main.dart
- unnecessary_type_name_in_constructor • 1 fix
+ my_project/lib/main.dart
+ unnecessary_type_name_in_constructor • 1 fix

-other_package/lib/other.dart
- unnecessary_type_name_in_constructor • 1 fix''',
+ other_package/lib/other.dart
+ unnecessary_type_name_in_constructor • 1 fix''',
expectedEdit: '''
>>>>>>>>>> ../other_package/lib/other.dart
class D {
@@ -412,13 +412,13 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0

Post-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.

-my_project/lib/main.dart
- unnecessary_type_name_in_constructor • 2 fixes''',
+ my_project/lib/main.dart
+ unnecessary_type_name_in_constructor • 2 fixes''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
class C {
@@ -447,13 +447,13 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0

Pre-migration fixes:
-2 fixes made in 1 file.
+ 2 fixes made in 1 file.

-my_project/lib/main.dart
- extraneous_modifier • 2 fixes''',
+ my_project/lib/main.dart
+ extraneous_modifier • 2 fixes''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
void m(int x, y) {}
@@ -481,16 +481,16 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0

Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.

-my_project/lib/main.dart
- extraneous_modifier • 1 fix
+ my_project/lib/main.dart
+ extraneous_modifier • 1 fix

-my_project/lib/other.dart
- extraneous_modifier • 1 fix''',
+ my_project/lib/other.dart
+ extraneous_modifier • 1 fix''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
void m(int x) {}
@@ -532,17 +532,17 @@
uris: [projectFolderUri, toUri(otherPackagePath)],
expectedSummary: '''
Bumped SDK constraints in 2 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
-- other_package: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0
+ - other_package: ^3.12.0 -> ^3.13.0

Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.

-my_project/lib/main.dart
- extraneous_modifier • 1 fix
+ my_project/lib/main.dart
+ extraneous_modifier • 1 fix

-other_package/lib/other.dart
- extraneous_modifier • 1 fix''',
+ other_package/lib/other.dart
+ extraneous_modifier • 1 fix''',
expectedEdit: '''
>>>>>>>>>> ../other_package/lib/other.dart
void f(y) {}
@@ -589,16 +589,16 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0

Pre-migration fixes:
-2 fixes made in 2 files.
+ 2 fixes made in 2 files.

-my_project/lib/a.dart
- extraneous_modifier • 1 fix
+ my_project/lib/a.dart
+ extraneous_modifier • 1 fix

-my_project/lib/src/b.dart
- extraneous_modifier • 1 fix''',
+ my_project/lib/src/b.dart
+ extraneous_modifier • 1 fix''',
expectedEdit: '''
>>>>>>>>>> lib/a.dart
void m(int x) {}
@@ -626,7 +626,7 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0''',
+ - test_project: ^3.12.0 -> ^3.13.0''',
expectedEdit: '''
>>>>>>>>>> pubspec.yaml
name: test_project
@@ -670,13 +670,13 @@
await _assertMigrationResult(
expectedSummary: '''
Bumped SDK constraints in 1 package(s):
-- test_project: ^3.12.0 -> ^3.13.0
+ - test_project: ^3.12.0 -> ^3.13.0

Pre-migration fixes:
-1 fix made in 1 file.
+ 1 fix made in 1 file.

-my_project/lib/main.dart
- avoid_final_parameters • 1 fix''',
+ my_project/lib/main.dart
+ avoid_final_parameters • 1 fix''',
expectedEdit: '''
>>>>>>>>>> lib/main.dart
void m(int x) {}
```
```
The name of the file: pkg/analysis_server/lib/src/lsp/handlers/custom/handler_migrate.dart
Insertions: 6, Deletions: 4.

@@ -318,7 +318,7 @@
'Bumped SDK constraints in ${bumpedLines.length} package(s):',
);
for (var line in bumpedLines) {
- summaryBuffer.writeln(line);
+ summaryBuffer.writeln(' $line');
}
}

@@ -444,18 +444,20 @@
var fixPlural = totalFixes == 1 ? 'fix' : 'fixes';
var filePlural = totalFiles == 1 ? 'file' : 'files';

- buffer.writeln('$totalFixes $fixPlural made in $totalFiles $filePlural.');
+ buffer.writeln(
+ ' $totalFixes $fixPlural made in $totalFiles $filePlural.',
+ );

var sortedPaths = fixesMap.keys.toList()..sort();
for (var path in sortedPaths) {
buffer.writeln();
- buffer.writeln(path);
+ buffer.writeln(' $path');
var fileFixes = fixesMap[path]!;
var sortedCodes = fileFixes.keys.toList()..sort();
for (var code in sortedCodes) {
var count = fileFixes[code]!;
var fixPlural = count == 1 ? 'fix' : 'fixes';
- buffer.writeln(' $code • $count $fixPlural');
+ buffer.writeln(' $code • $count $fixPlural');
}
}
}
```

Change information

Commit message:
[migrate] Print details for the fixes applied.

Added a summary section for pre-migrations and post-migrations,
detailing which diagnostics were fixed in which file (relative path).
Change-Id: Ib2a74767a6e7802d6b389c7a79352aa17513605c
Reviewed-by: Brian Wilkerson <brianwi...@google.com>
Commit-Queue: Kallen Tu <kall...@google.com>
Files:
  • M pkg/analysis_server/lib/src/lsp/handlers/custom/handler_migrate.dart
  • M pkg/analysis_server/test/lsp/migrate_test.dart
Change size: M
Delta: 2 files changed, 211 insertions(+), 28 deletions(-)
Branch: refs/heads/main
Submit Requirements:
  • requirement satisfiedCode-Review: +1 by Brian Wilkerson
Open in Gerrit
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: merged
Gerrit-Project: sdk
Gerrit-Branch: main
Gerrit-Change-Id: Ib2a74767a6e7802d6b389c7a79352aa17513605c
Gerrit-Change-Number: 516062
Gerrit-PatchSet: 4
Gerrit-Owner: Kallen Tu <kall...@google.com>
Gerrit-Reviewer: Brian Wilkerson <brianwi...@google.com>
Gerrit-Reviewer: Kallen Tu <kall...@google.com>
open
diffy
satisfied_requirement
Reply all
Reply to author
Forward
0 new messages