• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase-flutter / 27986095786
85%

Build:
DEFAULT BRANCH: main
Ran 22 Jun 2026 09:45PM UTC
Jobs 8
Files 80
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

22 Jun 2026 09:44PM UTC coverage: 85.187% (-0.002%) from 85.189%
27986095786

push

github

web-flow
chore: enable avoid-passing-async-when-sync-expected lint (#1455)

> Stacked on top of #1454. Review/merge that one first; the base will
retarget to `main` automatically once it lands.

## What

Enables the DCM rule
[`avoid-passing-async-when-sync-expected`](https://dcm.dev/docs/rules/common/avoid-passing-async-when-sync-expected/)
(removing it from the ratchet list in `supabase_lints`) and resolves the
13 resulting violations.

## Why

When an `async` callback is passed where a synchronous one is expected,
the returned `Future` is discarded, so if it throws the error is
silently lost. This is the same class of problem as the
`unawaited_futures`/`discarded_futures` lints in #1454, just at call
sites that take a callback. Enabling it closes the remaining
async-safety gap.

## How

Each of the 13 sites was made synchronous, and the inner async work was
either wrapped in `unawaited(...)` (genuine fire-and-forget) or
extracted into a dedicated method, preserving existing behavior and
error handling. Highlights:

- `realtime_channel.dart`: extracted the `joinPush.receive('ok', ...)`
body into `_handleJoinOk(...)` (the `InvalidJWTToken` setAuth handling
is preserved verbatim).
- `realtime_client.dart`: extracted reconnect into `_reconnect()`,
heartbeat timer callback made sync with `unawaited(sendHeartbeat())`.
- `supabase_client.dart`: `onAuthStateChangeSync` listener made sync
with `unawaited(_handleTokenChanged(...))`.
- `supabase_stream_builder.dart`: `onDone: controller.close` → `onDone:
() => unawaited(controller.close())` in the asyncMap/asyncExpand
reimplementations.
- Remaining sites are in test mock servers and a widget-test stub.

No public API signatures were changed.

## Verification

- `dcm analyze`: 0 `avoid-passing-async-when-sync-expected` across all
packages.
- `dart analyze`: clean, no new `unawaited_futures`/`discarded_futures`.
- Tests: realtime_client (channel/socket/mock), supabase
(mock/utilities), and supabase_flutter suites all pass.

40 of 44 new or added lines in 5 files covered. (90.91%)

13 existing lines in 1 file now uncovered.

4106 of 4820 relevant lines covered (85.19%)

3.62 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
89.02
0.1% packages/realtime_client/lib/src/realtime_channel.dart
1
85.03
0.0% packages/supabase/lib/src/supabase_stream_builder.dart

Coverage Regressions

Lines Coverage ∆ File
13
76.96
-0.41% packages/postgrest/lib/src/postgrest_builder.dart
Jobs
ID Job ID Ran Files Coverage
1 supabase_flutter - 27986095786.1 22 Jun 2026 09:46PM UTC 11
77.27
GitHub Action Run
2 supabase - 27986095786.2 22 Jun 2026 09:45PM UTC 15
82.03
GitHub Action Run
3 realtime_client - 27986095786.3 22 Jun 2026 09:47PM UTC 11
88.19
GitHub Action Run
4 functions_client - 27986095786.4 22 Jun 2026 09:45PM UTC 2
97.14
GitHub Action Run
5 postgrest - 27986095786.5 22 Jun 2026 09:47PM UTC 9
84.03
GitHub Action Run
6 gotrue - 27986095786.6 22 Jun 2026 09:48PM UTC 26
83.52
GitHub Action Run
7 yet_another_json_isolate - 27986095786.7 22 Jun 2026 09:45PM UTC 1
79.03
GitHub Action Run
8 storage_client - 27986095786.8 22 Jun 2026 09:47PM UTC 5
93.0
GitHub Action Run
Source Files on build 27986095786
  • Tree
  • List 80
  • Changed 8
  • Source Changed 8
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #27986095786
  • 4c51f49a on github
  • Prev Build on main (#27970805559)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc