Sitelet https://github.com/flutter/flutter/pull/120936
Skip to content

[flutter_tools] Remove sound null safety flag - #120936

Merged
auto-submit[bot] merged 41 commits into
flutter:masterfrom
chris-forks:remove-sound-null-safety-flag
Mar 17, 2023
Merged

auto-submit[bot] merged 41 commits into
flutter:masterfrom
chris-forks:remove-sound-null-safety-flag

Conversation

@christopherfujino

@christopherfujino christopherfujino commented Feb 17, 2023 •

Copy link
Copy Markdown
Contributor

Fixes #118810

Remove both the --sound-null-safety and --null-assertions flags 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-safety and --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-assertions flag; it defaults to on but the user can explicitly disable it, which is the desired behavior per #118810 (comment).

@flutter-dashboard flutter-dashboard Bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Feb 17, 2023
@christopherfujino
christopherfujino force-pushed the remove-sound-null-safety-flag branch 3 times, most recently from 44f905d to 6338250 Compare February 27, 2023 20:46
@christopherfujino
christopherfujino marked this pull request as ready for review February 28, 2023 02:19
@flutter-dashboard flutter-dashboard Bot added framework flutter/packages/flutter repository. See also f: labels. c: contributor-productivity Team-specific productivity, code health, technical debt. labels Mar 6, 2023

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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)?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment thread packages/flutter_tools/lib/src/resident_runner.dart Outdated
@christopherfujino

Copy link
Copy Markdown
Contributor Author

FYI @a-siva

webPlatformDart2JSSoundKernelDill,

/// The precompiled SDKs and sourcemaps for web debug builds.
webPrecompiledSdk,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this cleanup related to the flag removal?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, these are the unsound parts of the web sdk, which are no longer reachable.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This #122215 is tracking not building it

}
flutterUsage.sendEvent(kNullSafetyCategory, 'runtime-mode', label: nullSafetyMode.toString());
flutterUsage.sendEvent(kNullSafetyCategory, 'stats', parameters: CustomDimensions(
nullSafeMigratedLibraries: migrated,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can these fields be removed from the CustomDimensions class?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh, good catch

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WDYT about this diff 3519e1f

Comment thread packages/flutter_tools/lib/src/reporting/custom_dimensions.dart Outdated
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],

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that non-nullable experiment flag used anymore? If this is the Dart SDK experiment flag it is no longer needed.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh, good catch

@christopherfujino christopherfujino added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 17, 2023
@auto-submit
auto-submit Bot merged commit 7c3088c into flutter:master Mar 17, 2023
@christopherfujino
christopherfujino deleted the remove-sound-null-safety-flag branch March 17, 2023 17:48
christopherfujino added a commit that referenced this pull request Mar 17, 2023
zanderso pushed a commit that referenced this pull request Mar 17, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 18, 2023
christopherfujino added a commit that referenced this pull request Mar 20, 2023
auto-submit Bot pushed a commit that referenced this pull request Mar 20, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App c: contributor-productivity Team-specific productivity, code health, technical debt. framework flutter/packages/flutter repository. See also f: labels. tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove option to pass unsound null safety flag in flutter build/run commands

3 participants