Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 45b7433

Browse files
author
Dart CI
committed
Version 2.19.0-395.0.dev
Merge f811d53 into dev
2 parents 996fe4d + f811d53 commit 45b7433

File tree

8 files changed

+29
-34
lines changed

8 files changed

+29
-34
lines changed

pkg/analyzer/analysis_options.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ linter:
3838
- always_use_package_imports
3939
- avoid_dynamic_calls
4040
- avoid_unused_constructor_parameters
41+
# Enable after linter 1.31 is released.
42+
#- collection_methods_unrelated_type
43+
- enable_null_safety
44+
- implicit_call_tearoffs
45+
- library_annotations
4146
- unawaited_futures
47+
- unnecessary_library_directive
4248
- unnecessary_parenthesis
4349
- use_super_parameters

pkg/analyzer/lib/src/generated/parser.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5-
library analyzer.parser;
6-
75
import 'package:_fe_analyzer_shared/src/parser/parser.dart' as fasta;
86
import 'package:_fe_analyzer_shared/src/parser/type_info.dart' as fasta;
97
import 'package:analyzer/dart/analysis/features.dart';

pkg/analyzer/lib/src/summary/format.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
// The generator sometimes generates unnecessary 'this' references.
1111
// ignore_for_file: unnecessary_this
1212

13-
library analyzer.src.summary.format;
14-
1513
import 'dart:convert' as convert;
1614
import 'dart:typed_data' as typed_data;
1715

pkg/analyzer/lib/src/summary2/macro_application.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class LibraryMacroApplier {
5858
libraryBuilder.element.accept(collector);
5959

6060
for (final targetElement in collector.targets) {
61-
final targetNode = _linker.elementNodes[targetElement];
61+
final targetNode = _linker.elementNodes[targetElement as ElementImpl];
6262
// TODO(scheglov) support other declarations
6363
if (targetNode is ClassDeclaration) {
6464
await performance.runAsync(

pkg/analyzer/test/src/fasta/recovery/partial_code/partial_code_support.dart

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,14 @@ abstract class PartialCodeTest extends AbstractRecoveryTest {
114114
descriptor, suffixes[i], i + 1, head, tail,
115115
featureSet: featureSet);
116116
}
117-
if (descriptor.failing != null) {
117+
var descriptorFailing = descriptor.failing;
118+
if (descriptorFailing != null) {
118119
test('${descriptor.name}_failingList', () {
119-
Set<String> failing = Set.from(descriptor.failing!);
120+
var failing = Set.of(descriptorFailing);
120121
if (includeEof) {
121122
failing.remove('eof');
122123
}
123-
failing.removeAll(suffixes.map((TestSuffix suffix) => suffix.name));
124+
failing.removeAll(suffixes.map((suffix) => suffix.name));
124125
expect(failing, isEmpty,
125126
reason:
126127
'There are tests marked as failing that are not being run');

pkg/analyzer/tool/summary/generate.dart

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -654,8 +654,6 @@ class _CodeGenerator {
654654
out("// The generator sometimes generates unnecessary 'this' references.");
655655
out('// ignore_for_file: unnecessary_this');
656656
out();
657-
out('library analyzer.src.summary.format;');
658-
out();
659657
out("import 'dart:convert' as convert;");
660658
out("import 'dart:typed_data' as typed_data;");
661659
out();

pkg/analyzer/tool/test_log_parser/test_log_parser.dart

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @dart = 2.9
21
// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
32
// for details. All rights reserved. Use of this source code is governed by a
43
// BSD-style license that can be found in the LICENSE file.
@@ -19,10 +18,10 @@ main(List<String> args) async {
1918
int index = 0;
2019
final int expectedPrefixLength = 'Expected: '.length;
2120
final int actualPrefixLength = 'Actual: '.length;
22-
TestResult currentResult;
21+
TestResult? currentResult;
2322
Map<String, List<TestResult>> testsByExpectedAndActual =
2423
<String, List<TestResult>>{};
25-
Map<String, List<TestResult>> testsByStackTrace =
24+
Map<String?, List<TestResult>> testsByStackTrace =
2625
<String, List<TestResult>>{};
2726
while (index < output.length) {
2827
String currentLine = output[index];
@@ -53,7 +52,7 @@ main(List<String> args) async {
5352
}
5453
if (hasStackTrace) {
5554
currentResult.stackTrace = output.sublist(index + 1, endIndex - 2);
56-
String traceLine = currentResult.traceLine;
55+
var traceLine = currentResult.traceLine;
5756
testsByStackTrace
5857
.putIfAbsent(traceLine, () => <TestResult>[])
5958
.add(currentResult);
@@ -68,11 +67,9 @@ main(List<String> args) async {
6867
List<String> missingCodes = <String>[];
6968
for (List<TestResult> results in testsByExpectedAndActual.values) {
7069
for (TestResult result in results) {
71-
String message = result.message;
72-
if (message != null) {
73-
if (message.startsWith('Bad state: Unable to convert (')) {
74-
missingCodes.add(message);
75-
}
70+
var message = result.message;
71+
if (message.startsWith('Bad state: Unable to convert (')) {
72+
missingCodes.add(message);
7673
}
7774
}
7875
}
@@ -82,15 +79,11 @@ main(List<String> args) async {
8279
List<String> keys = testsByExpectedAndActual.keys.toList();
8380
keys.sort();
8481
for (String key in keys) {
85-
List<TestResult> results = testsByExpectedAndActual[key];
82+
var results = testsByExpectedAndActual[key]!;
8683
results.sort((first, second) => first.testName.compareTo(second.testName));
8784
print('$key (${results.length})');
8885
for (TestResult result in results) {
89-
if (result.message == null) {
90-
print(' ${result.testName}');
91-
} else {
92-
print(' ${result.testName} (${result.message})');
93-
}
86+
print(' ${result.testName} (${result.message})');
9487
}
9588
}
9689
if (missingCodes.isNotEmpty) {
@@ -104,12 +97,13 @@ main(List<String> args) async {
10497
if (testsByStackTrace.isNotEmpty) {
10598
print('');
10699
print('Unique stack traces (${testsByStackTrace.length}):');
107-
List<String> keys = testsByStackTrace.keys.toList();
100+
var keys = testsByStackTrace.keys.toList();
108101
keys.sort((first, second) {
109-
return testsByStackTrace[second].length - testsByStackTrace[first].length;
102+
return testsByStackTrace[second]!.length -
103+
testsByStackTrace[first]!.length;
110104
});
111-
for (String traceLine in keys) {
112-
print(' (${testsByStackTrace[traceLine].length}) $traceLine');
105+
for (var traceLine in keys) {
106+
print(' (${testsByStackTrace[traceLine]!.length}) $traceLine');
113107
}
114108
}
115109
}
@@ -121,14 +115,14 @@ class TestResult {
121115
String testName;
122116
String expected;
123117
String actual;
124-
String message;
125-
List<String> stackTrace;
118+
late String message;
119+
late List<String> stackTrace;
126120

127121
TestResult(this.testName, this.expected, this.actual);
128122

129-
String get traceLine {
123+
String? get traceLine {
130124
for (int i = 0; i < stackTrace.length; i++) {
131-
String traceLine = stackTrace[i];
125+
var traceLine = stackTrace[i];
132126
if (traceLine.startsWith(framePattern) &&
133127
traceLine.contains('(package:')) {
134128
if (traceLine.contains('ResolutionApplier._get') ||

tools/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,5 @@ CHANNEL dev
2727
MAJOR 2
2828
MINOR 19
2929
PATCH 0
30-
PRERELEASE 394
30+
PRERELEASE 395
3131
PRERELEASE_PATCH 0

0 commit comments

Comments
 (0)