[flutter_tools] Remove sound null safety flag#120936
[flutter_tools] Remove sound null safety flag#120936auto-submit[bot] merged 41 commits intoflutter:masterfrom
Conversation
44f905d to
6338250
Compare
There was a problem hiding this comment.
@nshahan is it ok that I deleted this line? Or should I leave this line and hard-code the value (since I deleted the CLI arg in this PR)?
There was a problem hiding this comment.
Yes, looks like good cleanup. This is totally unneeded as long as you are prevented from passing
--no-sound-null-safety when compiling. It will be defaulted to false in the compiled SDK until it is fully cleaned up.
|
FYI @a-siva |
| webPlatformDart2JSSoundKernelDill, | ||
|
|
||
| /// The precompiled SDKs and sourcemaps for web debug builds. | ||
| webPrecompiledSdk, |
There was a problem hiding this comment.
Is this cleanup related to the flag removal?
There was a problem hiding this comment.
Yeah, these are the unsound parts of the web sdk, which are no longer reachable.
There was a problem hiding this comment.
This #122215 is tracking not building it
| } | ||
| flutterUsage.sendEvent(kNullSafetyCategory, 'runtime-mode', label: nullSafetyMode.toString()); | ||
| flutterUsage.sendEvent(kNullSafetyCategory, 'stats', parameters: CustomDimensions( | ||
| nullSafeMigratedLibraries: migrated, |
There was a problem hiding this comment.
Can these fields be removed from the CustomDimensions class?
There was a problem hiding this comment.
ooh, good catch
packages/flutter_tools/lib/src/reporting/custom_dimensions.dart
Outdated
Show resolved
Hide resolved
| final String testPath = path.join(path.dirname(test.path), 'lib', path.basenameWithoutExtension(test.path)); | ||
| final ProcessRunnerResult result = await runner.runProcess( | ||
| <String>[flutter, 'test', '--enable-experiment=non-nullable', '--null-assertions', testPath], | ||
| <String>[flutter, 'test', '--enable-experiment=non-nullable', testPath], |
There was a problem hiding this comment.
Is that non-nullable experiment flag used anymore? If this is the Dart SDK experiment flag it is no longer needed.
There was a problem hiding this comment.
ahh, good catch
This reverts commit 7c3088c.
Fixes #118810
Remove both the
--sound-null-safetyand--null-assertionsflags from the Flutter CLI tool. These will be removed from the Dart SDK in the 3.0 release. Before this change, we were defaulting to--sound-null-safetyand--no-null-assertions, and providing a warning if the user explicitly overrode this that they were going to be deprecated soon.Note there is no change in this PR related to the
--native-null-assertionsflag; it defaults to on but the user can explicitly disable it, which is the desired behavior per #118810 (comment).