[infra] Change default NNBD to strong.
Change-Id: I2d52bdb1747346d118ef962ab2caf910fe8ebf53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/296703
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
diff --git a/pkg/smith/lib/configuration.dart b/pkg/smith/lib/configuration.dart
index b5fca8f..c546cbd 100644
--- a/pkg/smith/lib/configuration.dart
+++ b/pkg/smith/lib/configuration.dart
@@ -230,7 +230,7 @@
// Fill in any missing values using defaults when possible.
architecture ??= Architecture.x64;
system ??= System.host;
- nnbdMode ??= NnbdMode.legacy;
+ nnbdMode ??= NnbdMode.strong;
sanitizer ??= Sanitizer.none;
// Infer from compiler from runtime or vice versa.
@@ -377,7 +377,7 @@
bool? useHotReloadRollback,
bool? useSdk,
bool? useQemu})
- : nnbdMode = nnbdMode ?? NnbdMode.legacy,
+ : nnbdMode = nnbdMode ?? NnbdMode.strong,
sanitizer = sanitizer ?? Sanitizer.none,
babel = babel ?? "",
builderTag = builderTag ?? "",
@@ -578,7 +578,7 @@
fields.add("runtime: $runtime");
fields.add("system: $system");
- if (nnbdMode != NnbdMode.legacy) fields.add("nnbd: $nnbdMode");
+ if (nnbdMode != NnbdMode.strong) fields.add("nnbd: $nnbdMode");
stringListField(String name, List<String> field) {
if (field.isEmpty) return;
diff --git a/pkg/smith/test/configuration_test.dart b/pkg/smith/test/configuration_test.dart
index b34c074..4ef4e89 100644
--- a/pkg/smith/test/configuration_test.dart
+++ b/pkg/smith/test/configuration_test.dart
@@ -398,7 +398,7 @@
mode: debug release
runtime: chrome d8
system: android fuchsia
- nnbd: legacy strong
+ nnbd: strong strong
sanitizer: none none
builder-tag: a tag b tag
vm-options: [vm a1, vm a2] [vm b1, vm b2]
@@ -429,7 +429,7 @@
mode: debug debug
runtime: chrome chrome
system: android android
- nnbd: legacy legacy
+ nnbd: strong strong
sanitizer: none none
builder-tag: a tag a tag
vm-options: [vm a1, vm a2] [vm a1, vm a2]
diff --git a/pkg/test_runner/lib/src/options.dart b/pkg/test_runner/lib/src/options.dart
index 9a4c0b1..74965ec 100644
--- a/pkg/test_runner/lib/src/options.dart
+++ b/pkg/test_runner/lib/src/options.dart
@@ -275,7 +275,7 @@
aliases: ['use_sdk'], help: 'Use compiler or runtime from the SDK.')
..addOption('nnbd',
allowed: NnbdMode.names,
- defaultsTo: NnbdMode.legacy.name,
+ defaultsTo: NnbdMode.strong.name,
help: '''Which set of non-nullable type features to use.
Allowed values are: legacy, weak, strong''')
@@ -918,6 +918,9 @@
final String message;
OptionParseException(this.message);
+
+ @override
+ String toString() => "OptionParseException: $message";
}
/// Prints the names of the configurations in the test matrix that match the
diff --git a/pkg/test_runner/test/options_test.dart b/pkg/test_runner/test/options_test.dart
index 3084305..72389f5 100644
--- a/pkg/test_runner/test/options_test.dart
+++ b/pkg/test_runner/test/options_test.dart
@@ -19,7 +19,7 @@
// TODO(rnystrom): Test other options.
var configuration = parseConfiguration([]);
Expect.equals(Progress.compact, configuration.progress);
- Expect.equals(NnbdMode.legacy, configuration.nnbdMode);
+ Expect.equals(NnbdMode.strong, configuration.nnbdMode);
}
void testOptions() {
@@ -105,7 +105,7 @@
void testSelectors() {
// Legacy suites.
for (var arguments in [
- <String>[],
+ ['--nnbd=legacy'],
['-nvm-legacy']
]) {
var configuration = parseConfiguration(arguments);
@@ -125,6 +125,7 @@
// Default null safe suites.
for (var arguments in [
+ <String>[],
['--nnbd=strong'],
['-nvm-strong']
]) {
diff --git a/pkg/test_runner/test/test_suite_test.dart b/pkg/test_runner/test/test_suite_test.dart
index 05cc9d6..5b76235 100644
--- a/pkg/test_runner/test/test_suite_test.dart
+++ b/pkg/test_runner/test/test_suite_test.dart
@@ -27,8 +27,8 @@
parseTestFile("/\/ Requirements=nnbd-strong", path: "strong_test.dart"),
];
- expectTestCases(
- [], testFiles, ["language/none_test", "language/legacy_test"]);
+ expectTestCases([], testFiles,
+ ["language/none_test", "language/nnbd_test", "language/strong_test"]);
expectTestCases(["--nnbd=legacy"], testFiles,
["language/none_test", "language/legacy_test"]);
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 7c3eb27..34d018a 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -371,136 +371,110 @@
},
"vm-(linux|mac|win|android|fuchsia)-(debug|product|release)-(ia32|x64|x64c|arm|arm64|arm64c|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
- "nnbd": "strong"
}
},
"vm-checked-(linux|mac|win|fuchsia)-(debug|product|release)-(ia32|x64|x64c|arm64|arm64c|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
- "nnbd": "strong",
"enable-asserts": true
}
},
"vm-aot-(linux|mac)-(debug|product|release)-(x64|x64c|arm64|arm64c)": {
"options": {
- "nnbd": "strong"
}
},
"vm-aot-win-(debug|product|release)-(x64|x64c|arm64|arm64c)": {
"options": {
- "nnbd": "strong",
"use-elf": true
}
},
"vm-aot-(linux|mac|win)-(debug|product|release)-(simarm|simarm_x64|simarm64|simriscv32|simriscv64)": {
"options": {
- "nnbd": "strong",
"use-elf": true
}
},
"vm-asan-(linux|mac)-(debug|product|release)-(ia32|x64|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
"builder-tag": "asan",
- "timeout": 240,
- "nnbd": "strong"
+ "timeout": 240
}
},
"vm-lsan-(linux|mac)-(debug|product|release)-(ia32|x64|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
"builder-tag": "lsan",
- "timeout": 240,
- "nnbd": "strong"
+ "timeout": 240
}
},
"vm-msan-linux-(debug|product|release)-(x64|simarm64|simriscv64)": {
"options": {
"builder-tag": "msan",
- "timeout": 240,
- "nnbd": "strong"
+ "timeout": 240
}
},
"vm-tsan-(linux|mac)-(debug|product|release)-(x64|simarm64|simriscv64)": {
"options": {
"builder-tag": "tsan",
- "timeout": 240,
- "nnbd": "strong"
+ "timeout": 240
}
},
"vm-ubsan-(linux|mac)-(debug|product|release)-(ia32|x64|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
"builder-tag": "ubsan",
- "timeout": 240,
- "nnbd": "strong"
+ "timeout": 240
}
},
"vm-aot-asan-(linux|mac)-(debug|product|release)-(x64|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
- "builder-tag": "asan",
- "timeout": 240,
- "nnbd": "strong",
- "compiler": "dartkp"
+ "builder-tag": "asan"
}
},
"vm-aot-lsan-(linux|mac)-(debug|product|release)-(x64|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
"builder-tag": "lsan",
- "timeout": 240,
- "nnbd": "strong",
- "compiler": "dartkp"
+ "timeout": 240
}
},
"vm-aot-msan-linux-(debug|product|release)-(x64|simarm64|simriscv64)": {
"options": {
"builder-tag": "msan",
- "timeout": 240,
- "nnbd": "strong",
- "compiler": "dartkp"
+ "timeout": 240
}
},
"vm-aot-tsan-(linux|mac)-(debug|product|release)-(x64|simarm64|simriscv64)": {
"options": {
"builder-tag": "tsan",
- "timeout": 240,
- "nnbd": "strong",
- "compiler": "dartkp"
+ "timeout": 240
}
},
"vm-aot-ubsan-(linux|mac)-(debug|product|release)-(x64|simarm|simarm64|simriscv32|simriscv64)": {
"options": {
"builder-tag": "ubsan",
- "timeout": 240,
- "nnbd": "strong",
- "compiler": "dartkp"
+ "timeout": 240
}
},
"dart2js-(linux|win)-chrome": {
"options": {
- "nnbd": "strong",
"use-sdk": true
}
},
"dart2js-(linux|win)-firefox": {
"options": {
- "nnbd": "strong",
"use-sdk": true
}
},
"dart2js-win-ie11": {
"options": {
"babel": "{\"presets\":[\"es2015\"]}",
- "nnbd": "strong",
"use-sdk": true
}
},
"dart2js-win-edge": {
"options": {
- "nnbd": "strong",
"use-sdk": true
}
},
"dart2js-mac-(chrome|safari)": {
"options": {
"architecture": "arm64",
- "nnbd": "strong",
"use-sdk": true
}
},
@@ -508,14 +482,12 @@
"options": {
"csp": true,
"minified": true,
- "nnbd": "strong",
"use-sdk": true
}
},
"dart2js-minified-linux-d8": {
"options": {
"minified": true,
- "nnbd": "strong",
"use-sdk": true
}
},
@@ -525,7 +497,6 @@
"dart2js-options": [
"-O3"
],
- "nnbd": "strong",
"use-sdk": true
}
},
@@ -535,7 +506,6 @@
"dart2js-options": [
"-O0"
],
- "nnbd": "strong",
"use-sdk": true
}
},
@@ -546,14 +516,12 @@
"--canary"
],
"host-checked": true,
- "nnbd": "strong",
"timeout": 240
}
},
"dart2js-hostasserts-linux-d8": {
"options": {
"host-checked": true,
- "nnbd": "strong",
"timeout": 240
}
},
@@ -580,12 +548,12 @@
"--simple-load-ids"
],
"host-checked": true,
- "nnbd": "strong",
"timeout": 240
}
},
"dart2wasm-hostasserts-linux-x64-d8": {
"options": {
+ "nnbd": "legacy",
"host-checked": true,
"timeout": 240,
"builder-tag": "dart2wasm"
@@ -594,14 +562,12 @@
"vm-aot-android-(debug|product|release)-arm_x64": {
"options": {
"builder-tag": "crossword",
- "use-elf": true,
- "nnbd": "strong"
+ "use-elf": true
}
},
"vm-aot-android-(debug|product|release)-(arm|arm64|arm64c)": {
"options": {
- "use-elf": true,
- "nnbd": "strong"
+ "use-elf": true
}
},
"vm-aot-dwarf-linux-(debug|release|product)-x64": {
@@ -610,12 +576,12 @@
"vm-options": [
"--dwarf_stack_traces"
],
- "nnbd": "strong",
"use-elf": true
}
},
"dartkp-linux-(debug|release)-x64": {
"options": {
+ "nnbd": "legacy",
"vm-options": [
"--no-sound-null-safety"
],
@@ -627,7 +593,6 @@
"vm-aot-obfuscate-linux-(debug|release|product)-x64": {
"options": {
"builder-tag": "obfuscated",
- "nnbd": "strong",
"vm-options": [
"--obfuscate"
]
@@ -635,6 +600,7 @@
},
"dartk-linux-(debug|release)-x64": {
"options": {
+ "nnbd": "legacy",
"vm-options": [
"--no-sound-null-safety"
]
@@ -658,44 +624,37 @@
"vm-options": [
"--optimization-counter-threshold=5",
"--random-seed=__RANDOM__"
- ],
- "nnbd": "strong"
+ ]
}
},
"vm-reload-(linux|mac|win)-(debug|product|release)-(ia32|x64|x64c)": {
"options": {
- "hot-reload": true,
- "nnbd": "strong"
+ "hot-reload": true
}
},
"vm-reload-rollback-(linux|mac|win)-(debug|product|release)-(ia32|x64|x64c)": {
"options": {
- "hot-reload-rollback": true,
- "nnbd": "strong"
+ "hot-reload-rollback": true
}
},
"vm-linux-(debug|product|release)-(arm|arm64|arm64c|riscv32|riscv64)-qemu": {
"options": {
- "use-qemu": true,
- "nnbd": "strong"
+ "use-qemu": true
}
},
"vm-aot-linux-(debug|product|release)-(arm|arm64|arm64c|riscv32|riscv64)-qemu": {
"options": {
- "use-qemu": true,
- "nnbd": "strong"
+ "use-qemu": true
}
},
"vm-appjit-(linux|mac|win)-(debug|product|release)-(x64|arm64)": {
"options": {
- "compiler": "app_jitk",
- "nnbd": "strong"
+ "compiler": "app_jitk"
}
},
"ddc-(linux|win)-chrome": {
"options": {
"checked": true,
- "nnbd": "strong",
"use-sdk": true
}
},
@@ -703,14 +662,12 @@
"options": {
"architecture": "arm64",
"checked": true,
- "nnbd": "strong",
"use-sdk": true
}
},
"ddc-linux-firefox": {
"options": {
"checked": true,
- "nnbd": "strong",
"use-sdk": true
}
},
@@ -736,7 +693,6 @@
"ddc-options": [
"--canary"
],
- "nnbd": "strong",
"use-sdk": true
}
},
@@ -753,6 +709,7 @@
},
"cfe-(linux|mac|win)": {
"options": {
+ "nnbd": "legacy",
"compiler": "fasta"
}
},
@@ -768,12 +725,14 @@
},
"analyzer-(linux|mac|win)": {
"options": {
+ "nnbd": "legacy",
"compiler": "dart2analyzer",
"use-sdk": true
}
},
"analyzer-asserts-(linux|mac|win)": {
"options": {
+ "nnbd": "legacy",
"compiler": "dart2analyzer",
"enable-asserts": true,
"use-sdk": true