[flutter_tools] null assertions off by default for web (#64186)
Like Android/iOS, only enable --null-assertions if asked. Previously this was enabled by default for web, but in general this has proved to be too breaking to enable by default. #61042
This commit is contained in:
@@ -23,7 +23,7 @@ void main() {
|
||||
test('generateMainModule embeds urls correctly', () {
|
||||
final String result = generateMainModule(
|
||||
entrypoint: 'foo/bar/main.js',
|
||||
nullSafety: false,
|
||||
nullAssertions: false,
|
||||
);
|
||||
// bootstrap main module has correct defined module.
|
||||
expect(result, contains('define("main_module.bootstrap", ["foo/bar/main.js", "dart_sdk"], '
|
||||
@@ -33,7 +33,7 @@ void main() {
|
||||
test('generateMainModule includes null safety switches', () {
|
||||
final String result = generateMainModule(
|
||||
entrypoint: 'foo/bar/main.js',
|
||||
nullSafety: true,
|
||||
nullAssertions: true,
|
||||
);
|
||||
|
||||
expect(result, contains(
|
||||
|
||||
@@ -462,6 +462,7 @@ void main() {
|
||||
urlTunneller: null,
|
||||
useSseForDebugProxy: true,
|
||||
useSseForDebugBackend: true,
|
||||
nullAssertions: true,
|
||||
buildInfo: const BuildInfo(
|
||||
BuildMode.debug,
|
||||
'',
|
||||
@@ -574,6 +575,7 @@ void main() {
|
||||
urlTunneller: null,
|
||||
useSseForDebugProxy: true,
|
||||
useSseForDebugBackend: true,
|
||||
nullAssertions: true,
|
||||
buildInfo: const BuildInfo(
|
||||
BuildMode.debug,
|
||||
'',
|
||||
@@ -689,6 +691,7 @@ void main() {
|
||||
testMode: true,
|
||||
expressionCompiler: null,
|
||||
chromiumLauncher: null,
|
||||
nullAssertions: true,
|
||||
);
|
||||
webDevFS.requireJS.createSync(recursive: true);
|
||||
webDevFS.stackTraceMapper.createSync(recursive: true);
|
||||
@@ -725,6 +728,7 @@ void main() {
|
||||
urlTunneller: null,
|
||||
useSseForDebugProxy: true,
|
||||
useSseForDebugBackend: true,
|
||||
nullAssertions: true,
|
||||
buildInfo: const BuildInfo(
|
||||
BuildMode.debug,
|
||||
'',
|
||||
|
||||
Reference in New Issue
Block a user