Repository navigation
chore: fix the analyzer issues from Flutter 3.47 - #1705
Conversation
Dart 3.13's analyzer started reporting use_super_parameters on SupabaseStorageClient. Convert httpClient to a super parameter and drop the redundant private _httpClient field, reading the client back from storageFetch.httpClient in analyticsCatalog instead. The public parameter name is unchanged, so no call sites move. Flutter 3.47 also added AnalysisOptionsMigration, which rewrites every project's analysis_options.yaml to exclude the build and platform directories. Centralizing the exclusions in supabase_lints works for analysis, but the migration does not resolve `include:`, so it cannot tell they are already inherited and re-adds them to all 20 packages on every `flutter pub get`. Commit the duplicated blocks so a routine `pub get` no longer leaves a dirty working tree, and keep the canonical copy in supabase_lints so the duplicates can be deleted once the upstream issue is resolved. Reported upstream as flutter/flutter#191056
📝 WalkthroughWalkthroughAnalyzer configurations across examples and packages now exclude generated and platform-specific directories. ChangesAnalyzer exclusions
Storage HTTP client forwarding
Android toolchain update
Estimated code review effort: 2 (Simple) | ~10 minutes Mergeability Score: 🔵 Low · up to The Android example now uses newer build tooling that requires JDK 17 and a compatible Gradle version; if the build environment is older, Android builds may fail. The PR is otherwise mergeable with explicit confirmation of the CI/build JDK. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
The migration prepends the analyzer block above the existing include, which does not match the shape of the `flutter create` template or the rest of our files. Order is irrelevant to the analyzer and to the migration, which parses the YAML rather than reading it positionally, so reordering is safe and `flutter pub get` stays quiet.
Flutter 3.47 raised the minimum Gradle to 8.14.0, so `flutter build apk` failed outright on the example app, which was on 8.13. Rather than do the minimum and land back here shortly, align the whole Android config with what `flutter create` emits on 3.47: Gradle 9.3.1, AGP 9.1.0, Kotlin 2.4.0 and Java 17. AGP 9 only reads the new DSL, which the Flutter Gradle plugin does not use yet, so the template opt-outs `android.newDsl=false` and `android.builtInKotlin=false` come along too. `android.enableJetifier` is dropped since AGP 9 no longer supports Jetifier, and `kotlinOptions` is replaced by the `kotlin` block that current KGP expects.
There was a problem hiding this comment.
🔇 Additional comments (4)
packages/supabase_flutter/example/android/app/build.gradle (1)
14-15: LGTM!Also applies to: 38-43
packages/supabase_flutter/example/android/gradle.properties (1)
1-7: LGTM!packages/supabase_flutter/example/android/gradle/wrapper/gradle-wrapper.properties (1)
5-5: LGTM!packages/supabase_flutter/example/android/settings.gradle (1)
21-22: 🩺 Stability & Availability
⚠️ Unverified finding
Sandbox verification was unavailable.Verify the Android build on JDK 17.
Lines [21] and [22] select AGP 9.1.0 and Kotlin 2.4.0. AGP 9.1 requires Gradle 9.3.1 and JDK 17. Kotlin 2.4.0 supports this Gradle and AGP combination. (developer.android.com)
The supplied
.github/workflows/build.ymlexcerpt runsflutter build, but it does not show JDK selection. Confirm that the Android build job uses JDK 17.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 23912894-9a76-4abf-9e70-9b0f26d4e8d9
📒 Files selected for processing (4)
packages/supabase_flutter/example/android/app/build.gradlepackages/supabase_flutter/example/android/gradle.propertiespackages/supabase_flutter/example/android/gradle/wrapper/gradle-wrapper.propertiespackages/supabase_flutter/example/android/settings.gradle
What kind of change does this PR introduce?
Chore. Fixes the two things that broke with Flutter 3.47 / Dart 3.13.
What is the current behavior?
dart analyze --fatal-infos .fails, andflutter pub getleaves a 20-file dirty working tree.What is the new behavior?
use_super_parametersinSupabaseStorageClientDart 3.13's analyzer started reporting:
httpClientis now a super parameter, and the redundant private_httpClientfield is gone.analyticsCatalogreads the client back fromstorageFetch.httpClient, which holds the same instance. The public parameter name is unchanged, so no call sites move. The now-unusedpackage:httpimport is dropped.Committed
analyzer: exclude:blocksFlutter 3.47 added
AnalysisOptionsMigration, which rewrites every project'sanalysis_options.yamlto excludebuild/and the platform directories. It runs fromensureReadyForPlatformSpecificTooling, sopub get,analyze,runandbuildall trigger it.The natural fix is to put the exclusions in
supabase_lintsonce. That does work for analysis. But the migration only reads each project's own file and never resolvesinclude:, so it cannot tell the exclusions are already inherited and re-adds them to all 20 packages on everyflutter pub get. Reverting and re-running brings them straight back.So this commits the duplicated blocks to stop the churn, and keeps the canonical copy in
supabase_lintswith a comment pointing at the upstream issue, so the 20 duplicates can be deleted once it is fixed.Reported upstream as flutter/flutter#191056.
pubspec.lockalso picks up transitive bumps required by the new SDK constraints.Additional context
Verified locally on Flutter 3.47.0 / Dart 3.13.0:
dart analyze --fatal-infos .reports no issuesdart format --line-length 80 --set-exit-if-changed packages examplesreports 0 changed across 285 filesflutter pub getno longer printsUpgrading analysis_options.yaml ...and leaves the tree cleanstorage_clientunit tests pass (basic_test.dart,fetch_test.dart,path_encoding_test.dart)The backend-dependent test suites were not run locally.
Summary by CodeRabbit
Bug Fixes
Refactor
Chores