Skip to content

1.1.0 — Credentials are read on their own actor

Latest

Choose a tag to compare

@sisoje sisoje released this 26 Aug 10:39
· 7 commits to main since this release

Description

Fixes a crash in any SwiftUI app whose credentials live in @Binding state.

Binding is @unchecked Sendable, but its getter and setter are
@isolated(any) — the value moves between actors freely, the accessors don't.
The Supabase wiring read its credentials inside request building, which runs
@concurrent, so every request traps. Tests missed it because .constant
carries no isolation.

Credentials are now read in one hop on the main actor; composition still runs
off it. RefreshingExecutor's gate is @MainActor rather than capturing
#isolation at construction, which was only correct when the executor and the
bindings were built on the same actor.

Source-breaking, theoretical for most callers: NetworkExecution.request is
now async (sync builders convert implicitly, so existing call sites compile
unchanged), and RefreshingExecutor.init drops its defaulted isolation:
parameter.