Skip to content

Commit 9421f93

Browse files
authored
chore: fix the analyzer issues from Flutter 3.47 (#1705)
## 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`](https://github.com/flutter/flutter/blob/master/packages/flutter_tools/lib/src/migrations/analysis_options_migration.dart), 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. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## 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. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 0202c33 commit 9421f93

27 files changed

Lines changed: 244 additions & 33 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options_flutter.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options_flutter.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options_flutter.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**

‎examples/passkeys/analysis_options.yaml‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,11 @@ analyzer:
44
errors:
55
# The passkey API is intentionally marked @experimental upstream.
66
experimental_member_use: ignore
7+
exclude:
8+
- build/**
9+
- android/**
10+
- ios/**
11+
- web/**
12+
- windows/**
13+
- macos/**
14+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options_flutter.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options_flutter.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
include: package:supabase_lints/analysis_options.yaml
2+
3+
analyzer:
4+
exclude:
5+
- build/**
6+
- android/**
7+
- ios/**
8+
- web/**
9+
- windows/**
10+
- macos/**
11+
- linux/**

0 commit comments

Comments
 (0)