Repository navigation
Commit 9421f93
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
- examples
- authentication
- database_crud
- edge_functions
- launcher
- passkeys
- realtime_room
- storage_transforms
- packages
- functions_client
- gotrue
- postgrest
- realtime_client
- storage_client
- lib/src
- supabase_common
- supabase_flutter
- example
- android
- app
- gradle/wrapper
- supabase_lints
- lib
- supabase_typegen
- supabase
- example
- yet_another_json_isolate
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
0 commit comments