Skip to content

v0.21.0 — transport decisions leave the View

Latest

Choose a tag to compare

@SteliyanH SteliyanH released this 31 Aug 15:27
· 3 commits to main since this release
32e974b

Breaking, in a package released the same day.

v0.20.0 shipped the transport decisions as statics on TransportBand, documented as callable without a rendering host. They were not: TransportBand is a View, a View is implicitly @MainActor, and so every static was main-actor isolated — precisely what they were meant not to be. The doc comment said one thing; the isolation said another.

The reference app found it within the hour, forwarding to them from nonisolated members:

error: main actor-isolated default value in a nonisolated context

They now live in a TransportControls namespace, which is not a View:

TransportControls.timecode(currentTime)
TransportControls.shouldRestartForLoop(...)

I took the break rather than papering over it. Forwarding statics on the View would have kept 0.20's spelling compiling while leaving the isolation wrong for anyone who actually needed these off the main actor — which is the only reason to want them at all.

TransportBand itself is unchanged.

432 tests.