Skip to content

Commit 33f6649

Browse files
srawlinsCommit Queue
authored andcommitted
Bump DAS to use Dart SDK 3.9.0
Change-Id: I04bc285d822a657adb5573c6de3eb38655ab0fcd Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/448232 Reviewed-by: Brian Wilkerson <[email protected]> Commit-Queue: Samuel Rawlins <[email protected]>
1 parent cb23ff2 commit 33f6649

File tree

378 files changed

+4512
-5040
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

378 files changed

+4512
-5040
lines changed

pkg/analysis_server/benchmark/perf/dart_analyze.dart

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -139,18 +139,17 @@ class CmdLineSeveralProjectsBenchmark extends AbstractCmdLineBenchmark {
139139
String get workingDir => packageRoot;
140140

141141
@override
142-
List<String> analyzeWhat(bool quick) =>
143-
quick
144-
? ['meta']
145-
: [
146-
'analysis_server',
147-
'analysis_server_client',
148-
'analyzer',
149-
'analyzer_cli',
150-
'analyzer_plugin',
151-
'analyzer_utilities',
152-
'_fe_analyzer_shared',
153-
];
142+
List<String> analyzeWhat(bool quick) => quick
143+
? ['meta']
144+
: [
145+
'analysis_server',
146+
'analysis_server_client',
147+
'analyzer',
148+
'analyzer_cli',
149+
'analyzer_plugin',
150+
'analyzer_utilities',
151+
'_fe_analyzer_shared',
152+
];
154153
}
155154

156155
class CmdLineSmallFileBenchmark extends AbstractCmdLineBenchmark {

pkg/analysis_server/integration_test/analysis/get_reachable_sources_test.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ class Bar {
3434
await analysisFinished;
3535

3636
var result =
37-
// ignore: deprecated_member_use_from_same_package
38-
await sendAnalysisGetReachableSources(pathname);
37+
// ignore: deprecated_member_use_from_same_package
38+
await sendAnalysisGetReachableSources(pathname);
3939
var sources = result.sources;
4040
var keys = sources.keys.toList();
4141
var url = File(pathname).uri.toString();

pkg/analysis_server/integration_test/analysis/occurrences_test.dart

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,9 @@ void f() {
5252
}
5353

5454
void check(String elementName, Iterable<String> expectedOccurrences) {
55-
var expectedOffsets =
56-
expectedOccurrences
57-
.map((String substring) => text.indexOf(substring))
58-
.toSet();
55+
var expectedOffsets = expectedOccurrences
56+
.map((String substring) => text.indexOf(substring))
57+
.toSet();
5958
var foundOffsets = findOffsets(elementName);
6059
expect(foundOffsets, equals(expectedOffsets));
6160
}
@@ -102,10 +101,9 @@ void f() {
102101
}
103102

104103
void check(String elementName, Iterable<String> expectedOccurrences) {
105-
var expectedOffsets =
106-
expectedOccurrences
107-
.map((String substring) => text.indexOf(substring))
108-
.toSet();
104+
var expectedOffsets = expectedOccurrences
105+
.map((String substring) => text.indexOf(substring))
106+
.toSet();
109107
var foundOffsets = findOffsets(elementName);
110108
expect(foundOffsets, equals(expectedOffsets));
111109
}
@@ -156,10 +154,9 @@ void f() {
156154
}
157155

158156
void check(String elementName, Iterable<String> expectedOccurrences) {
159-
var expectedOffsets =
160-
expectedOccurrences
161-
.map((String substring) => text.indexOf(substring))
162-
.toSet();
157+
var expectedOffsets = expectedOccurrences
158+
.map((String substring) => text.indexOf(substring))
159+
.toSet();
163160
var foundOffsets = findOffsets(elementName);
164161
expect(foundOffsets, equals(expectedOffsets));
165162
}
@@ -212,10 +209,9 @@ void f() {
212209
}
213210

214211
void check(String elementName, Iterable<String> expectedOccurrences) {
215-
var expectedOffsets =
216-
expectedOccurrences
217-
.map((String substring) => text.indexOf(substring))
218-
.toSet();
212+
var expectedOffsets = expectedOccurrences
213+
.map((String substring) => text.indexOf(substring))
214+
.toSet();
219215
var foundOffsets = findOffsets(elementName);
220216
expect(foundOffsets, equals(expectedOffsets));
221217
}

pkg/analysis_server/integration_test/analysis/update_content_list_test.dart

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,10 @@ void f() {
3737
// order in which they appear in the file. If these edits are applied in
3838
// the wrong order, some of the quotation marks will be in the wrong
3939
// places, and there will still be errors.
40-
var edits =
41-
'"'
42-
.allMatches(goodText)
43-
.map((Match match) => SourceEdit(match.start, 0, '"'))
44-
.toList();
40+
var edits = '"'
41+
.allMatches(goodText)
42+
.map((Match match) => SourceEdit(match.start, 0, '"'))
43+
.toList();
4544
await sendAnalysisUpdateContent({pathname: ChangeContentOverlay(edits)});
4645
await analysisFinished;
4746
// There should be no errors now, assuming that quotation marks have been

pkg/analysis_server/integration_test/coverage_test.dart

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,35 +23,29 @@ void main() {
2323
var lines = coverageFile.readAsLinesSync();
2424

2525
// ## server domain
26-
var coveredDomains =
27-
lines
28-
.where((line) => line.startsWith('## ') && line.endsWith(' domain'))
29-
.map(
30-
(line) =>
31-
line
32-
.substring('##'.length, line.length - 'domain'.length)
33-
.trim(),
34-
)
35-
.toSet();
26+
var coveredDomains = lines
27+
.where((line) => line.startsWith('## ') && line.endsWith(' domain'))
28+
.map(
29+
(line) =>
30+
line.substring('##'.length, line.length - 'domain'.length).trim(),
31+
)
32+
.toSet();
3633

3734
// Remove any ' (test failed)' suffixes.
38-
lines =
39-
lines.map((String line) {
40-
var index = line.indexOf('(');
41-
return index != -1 ? line.substring(0, index).trim() : line;
42-
}).toList();
35+
lines = lines.map((String line) {
36+
var index = line.indexOf('(');
37+
return index != -1 ? line.substring(0, index).trim() : line;
38+
}).toList();
4339

4440
// - [ ] server.getVersion
45-
var allMembers =
46-
lines
47-
.where((line) => line.startsWith('- '))
48-
.map((line) => line.substring('- [ ]'.length).trim())
49-
.toSet();
50-
var coveredMembers =
51-
lines
52-
.where((line) => line.startsWith('- [x]'))
53-
.map((line) => line.substring('- [x]'.length).trim())
54-
.toSet();
41+
var allMembers = lines
42+
.where((line) => line.startsWith('- '))
43+
.map((line) => line.substring('- [ ]'.length).trim())
44+
.toSet();
45+
var coveredMembers = lines
46+
.where((line) => line.startsWith('- [x]'))
47+
.map((line) => line.substring('- [x]'.length).trim())
48+
.toSet();
5549

5650
// generate domain tests
5751
for (var domain in api.domains) {
@@ -85,10 +79,9 @@ void main() {
8579
expect(
8680
fileExists,
8781
isMarkedAsCovered,
88-
reason:
89-
isMarkedAsCovered
90-
? '$testName marked as covered but has no test at $testPath'
91-
: '$testName marked as not covered has test at $testPath',
82+
reason: isMarkedAsCovered
83+
? '$testName marked as covered but has no test at $testPath'
84+
: '$testName marked as not covered has test at $testPath',
9285
);
9386
});
9487
}

pkg/analysis_server/integration_test/lsp_server/integration_tests.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,9 @@ abstract class AbstractLspAnalysisServerIntegrationTest
139139
@mustCallSuper
140140
Future<void> setUp() async {
141141
// Set up temporary folder for the test.
142-
projectFolderPath =
143-
Directory.systemTemp
144-
.createTempSync('analysisServer_test_integration_lspProject')
145-
.resolveSymbolicLinksSync();
142+
projectFolderPath = Directory.systemTemp
143+
.createTempSync('analysisServer_test_integration_lspProject')
144+
.resolveSymbolicLinksSync();
146145
_temporaryFolders.add(projectFolderPath);
147146
newFolder(projectFolderPath);
148147
newFolder(path.join(projectFolderPath, 'lib'));

pkg/analysis_server/integration_test/server/blaze_changes_test.dart

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,11 @@ class BlazeChangesTest extends AbstractAnalysisServerIntegrationTest {
5656
await super.setUp();
5757
oldSourceDirectory = sourceDirectory;
5858

59-
tmpPath =
60-
Directory(
61-
Directory.systemTemp
62-
.createTempSync('analysisServer_test_integration_blazeProject')
63-
.resolveSymbolicLinksSync(),
64-
).path;
59+
tmpPath = Directory(
60+
Directory.systemTemp
61+
.createTempSync('analysisServer_test_integration_blazeProject')
62+
.resolveSymbolicLinksSync(),
63+
).path;
6564
_temporaryFolders.add(tmpPath);
6665
workspacePath = inTmpDir('workspace_root');
6766
writeFile(inWorkspace(file_paths.blazeWorkspaceMarker), '');

pkg/analysis_server/integration_test/support/integration_test_methods.dart

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -285,8 +285,8 @@ abstract class IntegrationTest {
285285
///
286286
/// The stack trace associated with the generation of the error, used for
287287
/// debugging the server.
288-
late final Stream<ServerErrorParams> onServerError =
289-
_onServerError.stream.asBroadcastStream();
288+
late final Stream<ServerErrorParams> onServerError = _onServerError.stream
289+
.asBroadcastStream();
290290

291291
/// Stream controller for [onServerError].
292292
final _onServerError = StreamController<ServerErrorParams>(sync: true);
@@ -314,8 +314,8 @@ abstract class IntegrationTest {
314314
/// Parameters
315315
///
316316
/// entry: ServerLogEntry
317-
late final Stream<ServerLogParams> onServerLog =
318-
_onServerLog.stream.asBroadcastStream();
317+
late final Stream<ServerLogParams> onServerLog = _onServerLog.stream
318+
.asBroadcastStream();
319319

320320
/// Stream controller for [onServerLog].
321321
final _onServerLog = StreamController<ServerLogParams>(sync: true);
@@ -341,8 +341,8 @@ abstract class IntegrationTest {
341341
///
342342
/// Note: this status type is deprecated, and is no longer sent by the
343343
/// server.
344-
late final Stream<ServerStatusParams> onServerStatus =
345-
_onServerStatus.stream.asBroadcastStream();
344+
late final Stream<ServerStatusParams> onServerStatus = _onServerStatus.stream
345+
.asBroadcastStream();
346346

347347
/// Stream controller for [onServerStatus].
348348
final _onServerStatus = StreamController<ServerStatusParams>(sync: true);
@@ -973,8 +973,9 @@ abstract class IntegrationTest {
973973
/// errors: List<AnalysisError>
974974
///
975975
/// The errors contained in the file.
976-
late final Stream<AnalysisErrorsParams> onAnalysisErrors =
977-
_onAnalysisErrors.stream.asBroadcastStream();
976+
late final Stream<AnalysisErrorsParams> onAnalysisErrors = _onAnalysisErrors
977+
.stream
978+
.asBroadcastStream();
978979

979980
/// Stream controller for [onAnalysisErrors].
980981
final _onAnalysisErrors = StreamController<AnalysisErrorsParams>(sync: true);
@@ -1436,8 +1437,8 @@ abstract class IntegrationTest {
14361437
///
14371438
/// The existing imports in the library.
14381439
late final Stream<CompletionExistingImportsParams>
1439-
onCompletionExistingImports =
1440-
_onCompletionExistingImports.stream.asBroadcastStream();
1440+
onCompletionExistingImports = _onCompletionExistingImports.stream
1441+
.asBroadcastStream();
14411442

14421443
/// Stream controller for [onCompletionExistingImports].
14431444
final _onCompletionExistingImports =
@@ -1723,8 +1724,9 @@ abstract class IntegrationTest {
17231724
///
17241725
/// True if this is that last set of results that will be returned for the
17251726
/// indicated search.
1726-
late final Stream<SearchResultsParams> onSearchResults =
1727-
_onSearchResults.stream.asBroadcastStream();
1727+
late final Stream<SearchResultsParams> onSearchResults = _onSearchResults
1728+
.stream
1729+
.asBroadcastStream();
17281730

17291731
/// Stream controller for [onSearchResults].
17301732
final _onSearchResults = StreamController<SearchResultsParams>(sync: true);
@@ -3014,8 +3016,9 @@ abstract class IntegrationTest {
30143016
/// outline: FlutterOutline
30153017
///
30163018
/// The outline associated with the file.
3017-
late final Stream<FlutterOutlineParams> onFlutterOutline =
3018-
_onFlutterOutline.stream.asBroadcastStream();
3019+
late final Stream<FlutterOutlineParams> onFlutterOutline = _onFlutterOutline
3020+
.stream
3021+
.asBroadcastStream();
30193022

30203023
/// Stream controller for [onFlutterOutline].
30213024
final _onFlutterOutline = StreamController<FlutterOutlineParams>(sync: true);

pkg/analysis_server/integration_test/support/integration_tests.dart

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,9 @@ class Server {
604604
]) {
605605
// Provide a default implementation of the reverse request processor that
606606
// just throws because there are many tests that don't use reverse-requests.
607-
reverseRequestProcessor ??=
608-
(_) =>
609-
throw UnimplementedError(
610-
"A reverse request was received but the test did not provide 'reverseRequestProcessor'",
611-
);
607+
reverseRequestProcessor ??= (_) => throw UnimplementedError(
608+
"A reverse request was received but the test did not provide 'reverseRequestProcessor'",
609+
);
612610

613611
_process.stdout.transform(utf8.decoder).transform(LineSplitter()).listen((
614612
String line,
@@ -620,18 +618,16 @@ class Server {
620618
// {"event":"server.connected","params":{...}}The Dart VM service is listening on ...
621619
const dartVMServiceMessage = 'The Dart VM service is listening on ';
622620
if (trimmedLine.contains(dartVMServiceMessage)) {
623-
trimmedLine =
624-
trimmedLine
625-
.substring(0, trimmedLine.indexOf(dartVMServiceMessage))
626-
.trim();
621+
trimmedLine = trimmedLine
622+
.substring(0, trimmedLine.indexOf(dartVMServiceMessage))
623+
.trim();
627624
}
628625
const devtoolsMessage =
629626
'The Dart DevTools debugger and profiler is available at:';
630627
if (trimmedLine.contains(devtoolsMessage)) {
631-
trimmedLine =
632-
trimmedLine
633-
.substring(0, trimmedLine.indexOf(devtoolsMessage))
634-
.trim();
628+
trimmedLine = trimmedLine
629+
.substring(0, trimmedLine.indexOf(devtoolsMessage))
630+
.trim();
635631
}
636632
if (trimmedLine.isEmpty) {
637633
return;
@@ -998,10 +994,9 @@ abstract class _RecursiveMatcher extends Matcher {
998994
mismatchDescription = mismatchDescription
999995
.add(' (should be ')
1000996
.addDescriptionOf(matcher);
1001-
var subDescription =
1002-
matcher
1003-
.describeMismatch(item, StringDescription(), subState, false)
1004-
.toString();
997+
var subDescription = matcher
998+
.describeMismatch(item, StringDescription(), subState, false)
999+
.toString();
10051000
if (subDescription.isNotEmpty) {
10061001
mismatchDescription = mismatchDescription
10071002
.add('; ')
@@ -1062,10 +1057,9 @@ abstract class _RecursiveMatcher extends Matcher {
10621057
void populateMismatches(Object? item, List<MismatchDescriber> mismatches);
10631058

10641059
/// Create a [MismatchDescriber] describing a mismatch with a simple string.
1065-
MismatchDescriber simpleDescription(String description) => (
1066-
Description mismatchDescription,
1067-
) {
1068-
mismatchDescription.add(description);
1069-
return mismatchDescription;
1070-
};
1060+
MismatchDescriber simpleDescription(String description) =>
1061+
(Description mismatchDescription) {
1062+
mismatchDescription.add(description);
1063+
return mismatchDescription;
1064+
};
10711065
}

pkg/analysis_server/lib/plugin/protocol/protocol_dart.dart

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -257,17 +257,15 @@ int _preferRequiredParams(
257257
engine.FormalParameterElement e1,
258258
engine.FormalParameterElement e2,
259259
) {
260-
var rank1 =
261-
(e1.isRequiredNamed || e1.metadata.hasRequired)
262-
? 0
263-
: !e1.isNamed
264-
? -1
265-
: 1;
266-
var rank2 =
267-
(e2.isRequiredNamed || e2.metadata.hasRequired)
268-
? 0
269-
: !e2.isNamed
270-
? -1
271-
: 1;
260+
var rank1 = (e1.isRequiredNamed || e1.metadata.hasRequired)
261+
? 0
262+
: !e1.isNamed
263+
? -1
264+
: 1;
265+
var rank2 = (e2.isRequiredNamed || e2.metadata.hasRequired)
266+
? 0
267+
: !e2.isNamed
268+
? -1
269+
: 1;
272270
return rank1 - rank2;
273271
}

0 commit comments

Comments
 (0)