chore(repo): support Flutter 3.47 - #2895
Conversation
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v9 #2895 +/- ##
=====================================
Coverage ? 67.29%
=====================================
Files ? 431
Lines ? 27388
Branches ? 0
=====================================
Hits ? 18432
Misses ? 8956
Partials ? 0 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… enrichment test Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
db721bc to
19460a1
Compare
Submit a pull request
Linear: FLU-
Github Issue: #
CLA
Description of the pull request
Backport of
5205085e—chore(repo): support Flutter 3.47(#2882), plus59a1d57c—ci(repo): pass the project root to pana(#2881) and the test half ofdec43e3b—feat(core): dynamic search debounce based on query length(#2873).v9needs this for the same reasonmasterdid:stream_flutter_workflow.ymlsetsflutter_version: "3.x"and.github/actions/pana/action.ymlpins"3.x", so every job adopted Flutter 3.47.0 / Dart 3.13.0 within hours of its 2026-08-12 release while.fvmrcstayed on 3.27.4. CI went red with no code change.Compat only, matching #2882. No Flutter floor raise —
v9stays on Flutter 3.27.4 / Dart^3.6.2.Manual port, not a cherry-pick
Deliberate divergences from #2882:
poll_footer.dartdroppedunused_element_parameterfires only on private elements. Onv9the class is the publicPollFooterButton(title/onPressed), notmaster's private_PollFooterButton(label/type) reached through two redirecting constructors. The diagnostic does not occur here, andonPressedis legitimately passednull(poll_footer.dart:135) — making itrequiredwould be both an API and a behaviour break..github/actions/pana/action.ymladdedv9's four📊 Verify Pana Scorechecks were red —could not find package stream_chat_flutter at "../stream_chat_flutter", 40/160 against a 100 minimum. Cause is the missing--project-root, fixed onmasterby #2881 the day before #2882. Without it this PR's own checks stay failing.v9formats at dart_style's default 80 columns (noformatter:block) versusmaster'spage_width: 120, so theclient.darthunks are split differently andmain.dartcarries only the five lint fixes — none of #2882's 120-column reflow.unawaited_return_in_try_block—StreamChatClient.syncBoth un-awaited returns exist verbatim on
v9. Fixed as onmaster, including the follow-up (09da4ca) that wraps the 400-recovery path so both paths share one error contract: a failure fromflush()or the finalupdateLastSyncAt()is now logged and swallowed like every other sync failure instead of escaping to the caller.AnalysisOptionsMigrationFlutter 3.47 ships flutter/flutter#187940 — a no-opt-out migrator that injects an
analyzer.excludeblock onpub get. Confirmed onv9: amelos bootstrapunder 3.47 rewrote bothsample_app/analysis_options.yamlandpackages/stream_chat_flutter_core/example/analysis_options.yaml, which fails theformatjob becausevalidate-formatting.shgrepsgit ls-files --modifiedafter bootstrap.Handled exactly as #2882 did —
sample_apptakes the migration; the core example drops its file (the migrator early-returns when absent, andmelos run analyzealready skips*example*). The example now inherits the root config, which surfaced the same five lints (use_super_parameters,prefer_const_constructors) — fixed. After the change,melos bootstrapleaves the tree untouched.Android floors
Read out of 3.47's
DependencyVersionChecker.ktup front rather than iterating through CI, since the check is fail-fast:Not moving to 3.47's verified matrix (Gradle 9.3.1 / AGP 9.1.0 / KGP 2.4.0) — same reasoning as #2882: AGP 9 forces the built-in-Kotlin and new-DSL migrations.
android.newDsl=falseandandroid.builtInKotlin=falsekeep AGP 8 behaviour.Also fixed:
rate_limiterfallout (pre-existing, unrelated to Flutter)The
testjob was failing on 8 tests inmessage_input_url_enrichment_test.dart. Not caused by Flutter 3.47 — they fail identically under 3.44.2, and have been failing since 2026-08-11:rate_limiter1.1.0 was published on 2026-08-11 and switched the debounce's clock source fromDateTime.now()topackage:clock.v9pinnedrate_limiter: ^1.0.0, which permits 1.1.0, so the branch silently picked it up.tester.runAsync+ a realFuture.delayed(500ms). That advances the real clock, which is what 1.0.0 read — but 1.1.0 readspackage:clock, which undertestWidgetsonly advances when the test clock is pumped. So the debounce never fired,client.enrichUrlwas never called, and all 8 cases failed.masterhit the same thing and fixed it in feat(core): dynamic search debounce based on query length #2873, the very PR that raised the constraint, by rewriting the helper to plaintester.pump(500ms).v9received fix(ui): enrich link previews for uppercase URL schemes #2843's test but never feat(core): dynamic search debounce based on query length #2873's rewrite.Ported that rewrite and raised the floor to
rate_limiter: ^1.1.1viamelos.yaml(melos bootstrappropagated it tostream_chatandstream_chat_flutter).Why
^1.1.1and not^1.1.0: 1.1.0 depends onclock ^1.1.2, but Flutter 3.27.4 —v9's declared floor — pinsclock 1.1.1throughflutter_localizations, so^1.1.0is unresolvable on the floor andanalyze_legacy_versionsfails version solving.rate_limiter 1.1.1relaxes that toclock ^1.1.1, which resolves on both the floor and current stable.masternever hit this because its floor is Flutter 3.41+, whereclockis already 1.1.2+.Verification
All under Flutter 3.47.0 / Dart 3.13.0, each check A/B'd against 3.44.2 (Dart 3.12.2):
sample_app. Thesyncfix is the only change 3.13 required onv9— no second diagnostic, andunnecessary_await_in_returndoes not conflict with the newreturn await.analysis_options.yamlanalysed directly under both SDKs: clean. Unlike chore(repo): fix ci issues for flutter 3.44 #2667 there are noundefined_lint/deprecated_lintrules to delete.dart formatreports 0 changed across all 886 tracked.dartfiles under both SDKs — dart_style did not move, so no reformat commit.stream_chat(1302),stream_chat_flutter_core,stream_chat_persistence,stream_chat_localizationsall pass under both SDKs — no new 3.47 runtime assertions.rate_limitercombinations verified for the url enrichment test: 8/8 on Flutter 3.47.0 and 8/8 on the 3.27.4 floor, each resolvingrate_limiter 1.1.1.analyze_legacy_versionsstep reproduced on the floor (Flutter 3.27.4, in an isolated worktree):dart analyze --fatal-infos libclean plusflutter test --exclude-tags goldengreen forstream_chat(1302 passed / 2 skipped) andstream_chat_flutter(706 passed / 10 skipped).pubspec.lockuntouched; notest_api: anyleft behind.update_goldens.yml(34b53b83, 26ci/*.png). Note thetestjob was already passing every golden under 3.47 before that commit — the drift was within alchemist's tolerance, so the rewrite is a no-op for CI.Screenshots / Videos
No UI changes.