swift-async-algorithms 1.1.3 fails to compile with the current swift-nightly-main toolchain.
All errors are in MultiProducerSingleConsumerAsyncChannel+Internal.swift and look like this:
error: '$0.enqueueContinuation' cannot be returned
note: returning '$0.enqueueContinuation' risks concurrent access to 'inout sending' parameter '$0'
as caller assumes '$0' and result can be sent to different isolation domains
Same pattern repeats for enqueueProducer, cancelProducer, finish, next, suspendNext, and cancelNext.
To reproduce:
docker run --rm swiftlang/swift:nightly-main-jammy \
bash -cl "git clone https://github.com/apple/swift-async-algorithms.git && cd swift-async-algorithms && swift build"
Looks like the nightly compiler tightened region-isolation checks around values returned from Mutex.withLock closures that use inout sending parameters.
swift-async-algorithms 1.1.3 fails to compile with the current swift-nightly-main toolchain.
All errors are in
MultiProducerSingleConsumerAsyncChannel+Internal.swiftand look like this:Same pattern repeats for
enqueueProducer,cancelProducer,finish,next,suspendNext, andcancelNext.To reproduce:
docker run --rm swiftlang/swift:nightly-main-jammy \ bash -cl "git clone https://github.com/apple/swift-async-algorithms.git && cd swift-async-algorithms && swift build"Looks like the nightly compiler tightened region-isolation checks around values returned from
Mutex.withLockclosures that useinout sendingparameters.