-
Notifications
You must be signed in to change notification settings - Fork 9.8k
[ci] Run analysis with older versions of Flutter #5000
[ci] Run analysis with older versions of Flutter #5000
Conversation
…es that would be skipped
3614314
to
d397524
Compare
This should be ready for review (I'll just need to re-push to get |
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 with a nit
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 with a nit
(forgot to add nit in last review)
.cirrus.yml
Outdated
matrix: | ||
CHANNEL: "2.5.3" | ||
CHANNEL: "2.8.1" | ||
analyze_script: | ||
- ./script/tool_runner.sh analyze --skip-not-supporting-flutter-version="$CHANNEL" --custom-analysis=script/configs/custom_analysis.yaml |
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.
This is great stuff! Thanks for adding this configurability to the package_looping_command!
As a sanity check to reduce accidentally publishing plugins that claim to work on versions we no longer officially support, but with Flutter pubspec constraints that will cause them to be picked up by old versions, this runs
analyze
with the previous two stable releases. While this won't catch all possible issues (runtime failures, use of new Flutter APIs in native code), it will catch a whole category of such errors with relatively little additional CI cost.While this does require manual updates to pubspec.yaml periodically, since this is best-effort testing such updates aren't time-critical, as the impact of forgetting is minimal.
Restructures the tool's analyze command to run
flutter packages get
during package iteration, instead of pre-iterating everything, to allow for skipping packages by version without having to duplicate logic. (This also has the advantage that failures in that step will be assigned to the specific package that causes the problem, as with most failures, rather than a generic step as it was previously doing.)No version change: Dropping support for older versions of Flutter doesn't need a release, just to be applied to future releases.
Part of flutter/flutter#98697
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.///
).