Bump infra packages to language version 3.12.

This CL is part of an effort to bump the SDK requirement to `3.12.0-0`
for all the packages in `pkg` that are not published to `pub`, so that
we can get better testing of the "private named parameters" feature.

(Packages that *are* published to `pub` can't be safely bumped yet,
because SDK 3.12 hasn't been released, and I don't want to block those
packages' ability to publish useful updates to customers.)

This change covers the following packages, which are owned by
OWNERS_INFRA:
- pkg/smith
- pkg/status_file
- pkg/test_runner

Changes to `pubspec.yaml` files were made manually.

Changes to `.dart` files were made automatically (with some
exceptions), using `dart fix` to migrate to using private named
parameters where it is possible to do so without changing
semantics. Note that this migration is conservative; see
https://github.com/dart-lang/sdk/issues/58607 for details.

The exceptions are:
- pkg/test_runner/lib/src/compiler_configuration.dart
- pkg/test_runner/lib/src/path.dart

These files contained code that triggered the
`use_null_aware_elements` lint, so I manually fixed the instances of
the lint. (The lint didn't previously fire because the test runner
used to be on language version 3.5.0, which was before the "null aware
elements" feature existed.)

Change-Id: Ia5d99ba5fc2d5aacbec5b091348be1d26a6a6964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/487882
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Paul Berry
2026-03-16 10:32:47 -07:00
committed by Commit Queue
parent 110550f420
commit bd0b10802b
8 changed files with 11 additions and 14 deletions
+1 -1
View File
@@ -4,7 +4,7 @@ description: Shared code for working with the Dart SDK's tests and test runner.
publish_to: none
environment:
sdk: ^3.5.0
sdk: '^3.12.0-0'
resolution: workspace
+2 -3
View File
@@ -205,9 +205,8 @@ class Expectation {
/// Whether this expectation is a test outcome. If not, it's a "meta marker".
final bool isOutcome;
Expectation._(this._name, {Expectation? group, bool isMeta = false})
: _group = group,
isOutcome = !isMeta;
Expectation._(this._name, {this._group, bool isMeta = false})
: isOutcome = !isMeta;
bool canBeOutcomeOf(Expectation expectation) {
Expectation? outcome = this;
+1 -1
View File
@@ -3,7 +3,7 @@ name: status_file
publish_to: none
environment:
sdk: ^3.5.0
sdk: '^3.12.0-0'
resolution: workspace
+2 -3
View File
@@ -170,11 +170,10 @@ class CompilationCommand extends ProcessCommand {
String executable,
List<String> arguments,
Map<String, String> environmentOverrides,
{required bool alwaysCompile,
{required this._alwaysCompile,
String? workingDirectory,
int index = 0})
: _alwaysCompile = alwaysCompile,
super(displayName, executable, arguments, environmentOverrides,
: super(displayName, executable, arguments, environmentOverrides,
workingDirectory, index);
@override
@@ -1116,7 +1116,7 @@ class PrecompilerCompilerConfiguration extends CompilerConfiguration
}
var args = [
if (target != null) ...target,
...?target,
...ldFlags,
shared,
'-o',
+2 -3
View File
@@ -33,7 +33,7 @@ class TestConfiguration {
this.build = false,
this.testList = const [],
this.deflakeInfoMap = const {},
int repeat = 1,
this._repeat = 1,
this.batch = false,
this.copyCoreDumps = false,
this.rr = false,
@@ -76,8 +76,7 @@ class TestConfiguration {
: packages = packages ??
Repository.uri
.resolve('.dart_tool/package_config.json')
.toFilePath(),
_repeat = repeat;
.toFilePath();
final Map<String, RegExp?> selectors;
final Progress progress;
+1 -1
View File
@@ -240,7 +240,7 @@ class Path {
var segmentsToJoin = [
if (isAbs) '',
if (drive != null) drive,
?drive,
if (newSegs.isEmpty) ...[
if (isAbs) '' else '.'
] else ...[
+1 -1
View File
@@ -7,7 +7,7 @@ name: test_runner
publish_to: none
environment:
sdk: ^3.5.0
sdk: '^3.12.0-0'
resolution: workspace