Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update null safety warnings in prep for Dart 3 #110998

Merged
merged 3 commits into from Sep 7, 2022

Conversation

mit-mit
Copy link
Member

@mit-mit mit-mit commented Sep 5, 2022

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

In Dart 3 only sound null safety will be allowed. This PR updates the output of flutter run and flutter build to provide a warning about this ahead of time. The messages link to the dart.dev nulls safety page, which is being updated to state this in dart-lang/site-www#4211.

List which issues are fixed by this PR. You must list at least one issue.

Contributes to dart-lang/sdk#49530, fixes #111116

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Sep 5, 2022
@mit-mit
Copy link
Member Author

mit-mit commented Sep 5, 2022

Screen Shot 2022-09-05 at 18 20 01

@@ -88,11 +88,11 @@ abstract class BuildSubCommand extends FlutterCommand {
);
} else {
globals.printStatus(
'Building without sound null safety',
'Building without sound null safety ⚠️',
Copy link
Member

@jonahwilliams jonahwilliams Sep 6, 2022

Choose a reason for hiding this comment

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

You'll need to add this emoji to https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/base/logger.dart#L717-L726

So that we don't try to print it on old windows terminals

Copy link
Member Author

@mit-mit mit-mit Sep 7, 2022

Choose a reason for hiding this comment

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

Thanks, done in 24991ef

Copy link
Member

@jonahwilliams jonahwilliams left a comment

LGTM with nit

Copy link
Member

@christopherfujino christopherfujino left a comment

LGTM with Jonah's nit

@mit-mit mit-mit merged commit 242bb67 into flutter:master Sep 7, 2022
108 checks passed
@mit-mit mit-mit deleted the dart3warnings branch Sep 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Sep 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

flutter tool: warn about Dart 3 only allowing sound null safety
3 participants