From 91cdf9f7a3559762285ee82cdf93f83b734fe0a7 Mon Sep 17 00:00:00 2001 From: "alexander.azarov" Date: Wed, 15 Apr 2026 12:34:36 -0400 Subject: [PATCH 1/2] Add missing availability annotations to TestClock and TestInstant When the `platforms:` field was removed from Package.swift in favor of availability annotations (042e1c4), `TestClock` and `TestInstant` were missed. Without `platforms:`, SwiftPM defaults to macOS 10.13, causing compilation failures for these protocols that use async/await. --- Sources/AsyncSequenceValidation/Clock.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Sources/AsyncSequenceValidation/Clock.swift b/Sources/AsyncSequenceValidation/Clock.swift index 492e0bbc..c85c92c1 100644 --- a/Sources/AsyncSequenceValidation/Clock.swift +++ b/Sources/AsyncSequenceValidation/Clock.swift @@ -22,6 +22,7 @@ extension AsyncSequenceValidationDiagram { } } +@available(AsyncAlgorithms 1.0, *) public protocol TestClock: Sendable { associatedtype Instant: TestInstant @@ -30,6 +31,7 @@ public protocol TestClock: Sendable { func sleep(until deadline: Self.Instant, tolerance: Self.Instant.Duration?) async throws } +@available(AsyncAlgorithms 1.0, *) public protocol TestInstant: Equatable { associatedtype Duration } From d4e643ba656fbcb225f8d1c0b5e03225baa132cf Mon Sep 17 00:00:00 2001 From: "alexander.azarov" Date: Fri, 17 Apr 2026 13:37:55 -0400 Subject: [PATCH 2/2] Work around swiftlang/swift#88530 in testWatermarWithLotsOfElements The compiler crashes on `MultiProducerSingleConsumerAsyncChannel.Source!` (IUO on an unbound generic member inside a closure). Spell out the generic arguments to sidestep the bug. --- .../MultiProducerSingleConsumerAsyncChannelTests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/AsyncAlgorithmsTests/MultiProducerSingleConsumerChannel/MultiProducerSingleConsumerAsyncChannelTests.swift b/Tests/AsyncAlgorithmsTests/MultiProducerSingleConsumerChannel/MultiProducerSingleConsumerAsyncChannelTests.swift index ead13dee..d57dfbf6 100644 --- a/Tests/AsyncAlgorithmsTests/MultiProducerSingleConsumerChannel/MultiProducerSingleConsumerAsyncChannelTests.swift +++ b/Tests/AsyncAlgorithmsTests/MultiProducerSingleConsumerChannel/MultiProducerSingleConsumerAsyncChannelTests.swift @@ -971,7 +971,7 @@ final class MultiProducerSingleConsumerAsyncChannelTests: XCTestCase { backpressureStrategy: .watermark(low: 2, high: 4) ) let channel = channelAndSource.takeChannel() - var source: MultiProducerSingleConsumerAsyncChannel.Source! = consume channelAndSource.source + var source: MultiProducerSingleConsumerAsyncChannel.Source! = consume channelAndSource.source group.addTask { var source = source.take()!