Skip to content

chore: fix the analyzer issues from Flutter 3.47 - #1705

Merged
spydon merged 3 commits into
mainfrom
chore/flutter-3-47-analyze
Aug 13, 2026
Merged

spydon merged 3 commits into
mainfrom
chore/flutter-3-47-analyze

Conversation

@spydon

@spydon spydon commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

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, and flutter pub get leaves a 20-file dirty working tree.

What is the new behavior?

use_super_parameters in SupabaseStorageClient

Dart 3.13's analyzer started reporting:

info • Parameter 'httpClient' could be a super parameter • packages/storage_client/lib/src/storage_client.dart:46:3 • use_super_parameters

httpClient is now a super parameter, and the redundant private _httpClient field is gone. analyticsCatalog reads the client back from storageFetch.httpClient, which holds the same instance. The public parameter name is unchanged, so no call sites move. The now-unused package:http import is dropped.

Committed analyzer: exclude: blocks

Flutter 3.47 added AnalysisOptionsMigration, which rewrites every project's analysis_options.yaml to exclude build/ and the platform directories. It runs from ensureReadyForPlatformSpecificTooling, so pub get, analyze, run and build all trigger it.

The natural fix is to put the exclusions in supabase_lints once. That does work for analysis. But the migration only reads each project's own file and never resolves include:, so it cannot tell the exclusions are already inherited and re-adds them to all 20 packages on every flutter 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_lints with 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.lock also 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 issues
  • dart format --line-length 80 --set-exit-if-changed packages examples reports 0 changed across 285 files
  • flutter pub get no longer prints Upgrading analysis_options.yaml ... and leaves the tree clean
  • storage_client unit 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

    • Improved analyzer behavior by excluding generated build artifacts and platform-specific directories from validation across examples and packages.
    • Preserved existing linting rules for project source code.
  • Refactor

    • Simplified HTTP client handling in storage operations while preserving existing behavior and constructor usage.
    • Iceberg catalog operations continue using the configured HTTP client.
  • Chores

    • Updated the Android example’s Gradle, Kotlin, Java, and JVM tooling to newer versions and configurations.

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
@spydon
spydon requested a review from a team as a code owner August 13, 2026 09:31
@coderabbitai

coderabbitai Bot commented Aug 13, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Analyzer configurations across examples and packages now exclude generated and platform-specific directories. SupabaseStorageClient now forwards and retrieves its HTTP client through existing superclass and fetch state. The Flutter example updates its Android and Gradle toolchain settings.

Changes

Analyzer exclusions

Layer / File(s) Summary
Configure analyzer exclusions
examples/*/analysis_options.yaml, packages/*/analysis_options.yaml, packages/*/example/analysis_options.yaml, packages/supabase_lints/lib/analysis_options.yaml
Analyzer configurations exclude build, android, ios, web, windows, macos, and linux directories.

Storage HTTP client forwarding

Layer / File(s) Summary
Forward the storage HTTP client
packages/storage_client/lib/src/storage_client.dart
SupabaseStorageClient removes its private HTTP client field, forwards httpClient through super.httpClient, and uses storageFetch.httpClient for Iceberg catalog construction.

Android toolchain update

Layer / File(s) Summary
Update the Android toolchain
packages/supabase_flutter/example/android/app/build.gradle, packages/supabase_flutter/example/android/gradle.properties, packages/supabase_flutter/example/android/gradle/wrapper/gradle-wrapper.properties, packages/supabase_flutter/example/android/settings.gradle
The example targets Java and Kotlin JVM 17, updates Kotlin and Android Gradle Plugin versions, upgrades Gradle, and adjusts Gradle properties.

Estimated code review effort: 2 (Simple) | ~10 minutes

Mergeability Score: 🔵 Low · up to 16d01

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: tr00d

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main compatibility and analyzer updates for Flutter 3.47.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/flutter-3-47-analyze

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔇 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.yml excerpt runs flutter 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

📥 Commits

Reviewing files that changed from the base of the PR and between eb1a3b4 and 16d01f6.

📒 Files selected for processing (4)
  • packages/supabase_flutter/example/android/app/build.gradle
  • packages/supabase_flutter/example/android/gradle.properties
  • packages/supabase_flutter/example/android/gradle/wrapper/gradle-wrapper.properties
  • packages/supabase_flutter/example/android/settings.gradle

@spydon
spydon merged commit 9421f93 into main Aug 13, 2026
45 checks passed
@spydon
spydon deleted the chore/flutter-3-47-analyze branch August 13, 2026 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants