diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5204d7..ff237e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,13 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [macos-15] + os: [macos-26] steps: - uses: actions/checkout@v4 - name: Select Xcode - run: sudo xcode-select -s /Applications/Xcode_26.3.app + run: sudo xcode-select -s /Applications/Xcode_26.5.app - name: Show Swift version run: swift --version diff --git a/Sources/EffectView/EffectObservable/EffectObservable.swift b/Sources/EffectView/EffectObservable/EffectObservable.swift index d435ffe..688a06d 100644 --- a/Sources/EffectView/EffectObservable/EffectObservable.swift +++ b/Sources/EffectView/EffectObservable/EffectObservable.swift @@ -34,7 +34,7 @@ public final class EffectObservable< internal(set) public var state: State @ObservationIgnored - private var send: Send? + private var runtimeSend: Send? @ObservationIgnored nonisolated(unsafe) private var runtimeUnavailable: RuntimeUnavailable? @ObservationIgnored @@ -71,11 +71,11 @@ public final class EffectObservable< env: env ) self._input = Input(self) - self.send = send + self.runtimeSend = send if let event = initialEvent { Task { do { - try await send(event, input: _input, continuation: nil) + try await send(event, input: _input) } catch { print("could not process initial event: \(error)") // TODO: consider sending a control event @@ -84,6 +84,7 @@ public final class EffectObservable< } } + @_optimize(none) // https://github.com/swiftlang/swift/issues/82523 isolated deinit { cancel() } @@ -117,11 +118,11 @@ public final class EffectObservable< /// critical failure, or `CancellationError` if accepted work is later cancelled. public func send(_ event: Event) async throws { try checkRuntimeAvailability() - guard let send = send else { + guard let send = runtimeSend else { throw RuntimeUnavailable.actorCancelled } do { - try await send(event, input: _input, continuation: nil) + try await send(event, input: _input) } catch { let boundaryError = runtimeBoundaryError(for: error) if let runtimeUnavailable = boundaryError as? RuntimeUnavailable { @@ -184,7 +185,7 @@ public final class EffectObservable< // TODO: consider to to add a Task cancellation handler which sends a corresponding control event to the transducer. // The transducer's action on this is currently "implementation defined". It *could* have no effect on the task operation, or it *could* cancel it. try checkRuntimeAvailability() - guard let send = self.send, let input = _input else { + guard let send = self.runtimeSend, let input = _input else { throw RuntimeUnavailable.actorCancelled } return try await withCheckedThrowingContinuation { (continuation: Continuation) in @@ -246,7 +247,7 @@ public final class EffectObservable< runtimeUnavailable = .actorCancelled - guard let send else { + guard let send = runtimeSend else { return }