-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Bump lower Dart SDK constraints to 3.0 & add class modifiers #122546
Conversation
FYI @jakemac53 @chingjun |
@LongCatIsLooong Do the changes to @gspencergoog Do the changes in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
YES! The overlay.dart changes LGTM. Pattern matching and record are still behind the experimental flag right?
Once this PR lands we're good to use them in the framework. This PR is still blocked on waiting for Dart v3.0.0-325.0.dev to roll into the engine & framework, though. That Dart version flips the flag on these features. |
4c20003
to
a559c82
Compare
cc @johnniwinther it sounds like we should hold off on landing this until exhaustiveness checking is finished? What is the status and is there an issue we can track? |
I am already getting a bunch of |
@goderbauer Note that the errors you see currently are from a temporary exhaustiveness algorithm based on flow-analysis. The real algorithm, which is in the process of being enabled, will yield different results. |
The CL for enabling the full exhaustiveness checking is https://dart-review.googlesource.com/c/sdk/+/288703 |
|
Full exhaustiveness checking is rolling into the framework with #123059. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
To my surprise, with the bump to 3.0 the analyzer complained about a handful of additional places where Edit: Looks like at runtime these new const get flagged as invalid: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8786064751393689137/+/u/run_test.dart_for_web_canvaskit_tests_shard_and_subshard_3/test_stdout |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ScrollBehavior changed re: dart-lang/sdk#51802 LGTM. Thank you!
child: ExpansionTile( | ||
// TODO(goderbauer): Reevaluate the following ignores when https://github.com/dart-lang/sdk/issues/51800 is fixed. | ||
await tester.pumpWidget(MaterialApp( // ignore: prefer_const_constructors | ||
home: Material( // ignore: prefer_const_constructors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these going to show up in any customer code that uses prefer_const_constructors? This lint is turned on as part of flutter_lints
, so it might affect a lot of people if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, they will see this once they bump the sdk constraints to 3.0 in their pubspecs. I am pushing hard on dart-lang/sdk#51800 to get this fixed before Dart 3 is released to stable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that seems important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of #118837.
This will allow us to use the latest Dart 3.0 features.
This PR also adds class modifiers where necessary:
base
class) to make the analyzer warnings below happyTapRegionRegistry
is used to fix analyzer warningsBlocked on waiting for flutter/engine#40178 to roll into the framework.