-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[tool] Upgrade repo to support Dart super parameters feature #5279
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!). If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Yikes, dart is too old, it seems we don't use the dart coming alongside flutter :/ |
Aha, Dart is coming from flutter; but from the flutter version that the dockerfile installs:
(from here (See Layer 16)) For this to pass we need to either update the dockerfile to something more recent (they're all ~11 days old, maybe enough) or tweak our PATH so we use dart from the flutter version we pin, instead of the one from the dockerfile. 🚨 Roller Stopped 🚨 |
That's the version of Flutter we update to whatever version we are testing against. I think the actual problem is that you're trying to unconditionally use a new language feature, which breaks our |
@@ -155,7 +155,7 @@ class CreateAllPluginsAppCommand extends PluginCommand { | |||
version: Version.parse('1.0.0+1'), | |||
environment: <String, VersionConstraint>{ | |||
'sdk': VersionConstraint.compatibleWith( | |||
Version.parse('2.12.0'), | |||
Version.parse('2.17.0'), |
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.
I think what we'll want to do is read flutter --version --machine
and then conditionally set this to 12 or 17 depending on the dartSDKVersion
we get.
Actually, come to think of it we could probably future-proof this command against this kind of thing by just always using the dartSdkVersion
as this version.
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.
I realized that wouldn't be quite right either; it would break us in cases like when Dart supported NNBD, but the template hadn't been updated yet and was still using an older version constraints so as not to opt in. #5281 should be the fully future-proof version.
Closing in favor of #5281 |
Ensure the Dart SDK is recent enough so the apps generated with a new language feature (super parameters) work; in our case, the "all_plugins" app.
*Should allow landing this flutter/flutter roll (included): #5278
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.