Version 2.11.0-158.0.dev
Merge commit 'c34eef4fd81c4fc738c051be039181136e43a1af' into 'dev'
diff --git a/pkg/test_runner/lib/src/compiler_configuration.dart b/pkg/test_runner/lib/src/compiler_configuration.dart
index 6b08ea0..597fe79 100644
--- a/pkg/test_runner/lib/src/compiler_configuration.dart
+++ b/pkg/test_runner/lib/src/compiler_configuration.dart
@@ -25,12 +25,30 @@
/// list allows the result of calling this to be spread into another list.
List<String> _experimentsArgument(
TestConfiguration configuration, TestFile testFile) {
- if (configuration.experiments.isEmpty && testFile.experiments.isEmpty) {
+ var experiments = {
+ ...configuration.experiments,
+ ...testFile.experiments,
+ if (configuration.nnbdMode != NnbdMode.legacy)
+ 'non-nullable',
+ };
+ if (experiments.isEmpty) {
return const [];
}
- var experiments = {...configuration.experiments, ...testFile.experiments};
- return ["--enable-experiment=${experiments.join(',')}"];
+ return ['--enable-experiment=${experiments.join(',')}'];
+}
+
+List<String> _nnbdModeArgument(TestConfiguration configuration) {
+ switch (configuration.nnbdMode) {
+ case NnbdMode.legacy:
+ return [];
+ case NnbdMode.strong:
+ return ['--sound-null-safety'];
+ case NnbdMode.weak:
+ return ['--no-sound-null-safety'];
+ }
+
+ throw 'unreachable';
}
/// Grouping of a command with its expected result.
@@ -175,6 +193,7 @@
else if (_configuration.hotReloadRollback)
'--hot-reload-rollback-test-mode',
...vmOptions,
+ ..._nnbdModeArgument(_configuration),
...testFile.sharedOptions,
..._configuration.sharedOptions,
..._experimentsArgument(_configuration, testFile),
@@ -426,13 +445,18 @@
..._configuration.sharedOptions,
..._experimentsArgument(_configuration, testFile),
...testFile.dart2jsOptions,
+ ..._nnbdModeArgument(_configuration),
...args
];
}
CommandArtifact computeCompilationArtifact(String tempDir,
List<String> arguments, Map<String, String> environmentOverrides) {
- var compilerArguments = [...arguments, ..._configuration.dart2jsOptions];
+ var compilerArguments = [
+ ...arguments,
+ ..._configuration.dart2jsOptions,
+ ..._nnbdModeArgument(_configuration),
+ ];
// TODO(athom): input filename extraction is copied from DDC. Maybe this
// should be passed to computeCompilationArtifact, instead?
@@ -729,9 +753,14 @@
static const String ndkPath = "third_party/android_tools/ndk";
String get abiTriple => _isArm || _isArmX64
? "arm-linux-androideabi"
- : _isArm64 ? "aarch64-linux-android" : null;
- String get host =>
- Platform.isLinux ? "linux" : Platform.isMacOS ? "darwin" : null;
+ : _isArm64
+ ? "aarch64-linux-android"
+ : null;
+ String get host => Platform.isLinux
+ ? "linux"
+ : Platform.isMacOS
+ ? "darwin"
+ : null;
Command computeAssembleCommand(String tempDir, List arguments,
Map<String, String> environmentOverrides) {
@@ -1104,6 +1133,7 @@
arguments.contains('--enable-asserts') ||
arguments.contains('--enable_asserts'))
'--enable-asserts',
+ ..._nnbdModeArgument(_configuration),
..._configuration.genKernelOptions,
];
diff --git a/tools/VERSION b/tools/VERSION
index e3ee7ca..cd329e1 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 11
PATCH 0
-PRERELEASE 157
+PRERELEASE 158
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 88ab3c4..bb2918c 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -398,10 +398,7 @@
"enable-asserts": true,
"mode": "release",
"runtime": "vm",
- "timeout": 240,
- "enable-experiment": [
- "non-nullable"
- ]
+ "timeout": 240
}
},
"analyzer-unittest-asserts-(debug|product|release)-(linux|mac|win)": {
@@ -516,12 +513,6 @@
"dart2js-weak-(linux|mac|win)-x64-d8": {
"options": {
"builder-tag": "dart2js-weak",
- "enable-experiment": [
- "non-nullable"
- ],
- "dart2js-options": [
- "--no-sound-null-safety"
- ],
"use-sdk": true
}
},
@@ -576,11 +567,7 @@
"dart2js-hostasserts-weak-(linux|win)-x64-(d8|chrome)": {
"options": {
"builder-tag": "dart2js-weak",
- "enable-experiment": [
- "non-nullable"
- ],
"dart2js-options": [
- "--no-sound-null-safety",
"--libraries-spec=sdk/lib/libraries.json",
"--platform-binaries=out/ReleaseX64/"
],
@@ -591,11 +578,7 @@
"dart2js-hostasserts-weak-mac-x64-(d8|chrome)": {
"options": {
"builder-tag": "dart2js-weak",
- "enable-experiment": [
- "non-nullable"
- ],
"dart2js-options": [
- "--no-sound-null-safety",
"--libraries-spec=sdk/lib/libraries.json",
"--platform-binaries=xcodebuild/ReleaseX64/"
],
@@ -606,11 +589,7 @@
"dart2js-hostasserts-strong-(linux|win)-x64-(d8|chrome)": {
"options": {
"builder-tag": "dart2js-strong",
- "enable-experiment": [
- "non-nullable"
- ],
"dart2js-options": [
- "--sound-null-safety",
"--libraries-spec=sdk/lib/libraries.json",
"--platform-binaries=out/ReleaseX64/"
],
@@ -621,11 +600,7 @@
"dart2js-hostasserts-strong-mac-x64-(d8|chrome)": {
"options": {
"builder-tag": "dart2js-strong",
- "enable-experiment": [
- "non-nullable"
- ],
"dart2js-options": [
- "--sound-null-safety",
"--libraries-spec=sdk/lib/libraries.json",
"--platform-binaries=xcodebuild/ReleaseX64/"
],
@@ -710,115 +685,49 @@
},
"dartkp-weak-asserts-(linux|mac)-(debug|product|release)-x64": {
"options": {
- "enable-experiment": [
- "non-nullable"
- ],
- "gen-kernel-options": [
- "--no-sound-null-safety"
- ],
"enable-asserts": true,
- "vm-options": [
- "--no-sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
"dartkp-weak-asserts-(linux|mac)-(debug|product|release)-simarm64": {
"options": {
- "enable-experiment": [
- "non-nullable"
- ],
- "gen-kernel-options": [
- "--no-sound-null-safety"
- ],
"enable-asserts": true,
"use-elf": true,
- "vm-options": [
- "--no-sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
"dartkp-weak-asserts-win-(debug|product|release)-(simarm64|x64)": {
"options": {
- "enable-experiment": [
- "non-nullable"
- ],
- "gen-kernel-options": [
- "--no-sound-null-safety"
- ],
"enable-asserts": true,
"use-elf": true,
- "vm-options": [
- "--no-sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
"dartk-weak-asserts-(linux|mac|win)-(debug|product|release)-x64": {
"options": {
- "enable-experiment": [
- "non-nullable"
- ],
"enable-asserts": true,
- "vm-options": [
- "--no-sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
"dartk-strong-(linux|mac|win)-(debug|product|release)-x64": {
"options": {
- "enable-experiment": [
- "non-nullable"
- ],
- "vm-options": [
- "--sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
"dartkp-strong-(linux|mac)-(debug|product|release)-x64": {
"options": {
- "enable-experiment": [
- "non-nullable"
- ],
- "gen-kernel-options": [
- "--sound-null-safety"
- ],
- "vm-options": [
- "--sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
"dartkp-strong-(linux|mac)-(debug|product|release)-simarm64": {
"options": {
- "enable-experiment": [
- "non-nullable"
- ],
- "gen-kernel-options": [
- "--sound-null-safety"
- ],
"use-elf": true,
- "vm-options": [
- "--sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
"dartkp-strong-win-(debug|product|release)-(simarm64|x64)": {
"options": {
"use-elf": true,
- "enable-experiment": [
- "non-nullable"
- ],
- "gen-kernel-options": [
- "--sound-null-safety"
- ],
- "vm-options": [
- "--sound-null-safety"
- ],
"builder-tag": "vm_nnbd"
}
},
@@ -868,9 +777,6 @@
"options": {
"checked": true,
"use-sdk": true,
- "enable-experiment": [
- "non-nullable"
- ],
"enable-asserts": true
}
},
@@ -878,9 +784,6 @@
"options": {
"checked": true,
"use-sdk": true,
- "enable-experiment": [
- "non-nullable"
- ],
"enable-asserts": true
}
},
@@ -891,18 +794,12 @@
},
"cfe-weak-(linux|mac|win)": {
"options": {
- "compiler": "fasta",
- "enable-experiment": [
- "non-nullable"
- ]
+ "compiler": "fasta"
}
},
"cfe-strong-(linux|mac|win)": {
"options": {
- "compiler": "fasta",
- "enable-experiment": [
- "non-nullable"
- ]
+ "compiler": "fasta"
}
},
"analyzer-(linux|mac|win)": {
@@ -922,20 +819,14 @@
"options": {
"compiler": "dart2analyzer",
"enable-asserts": true,
- "use-sdk": true,
- "enable-experiment": [
- "non-nullable"
- ]
+ "use-sdk": true
}
},
"analyzer-asserts-weak-(linux|mac|win)": {
"options": {
"compiler": "dart2analyzer",
"enable-asserts": true,
- "use-sdk": true,
- "enable-experiment": [
- "non-nullable"
- ]
+ "use-sdk": true
}
}
},