Add missing availability annotations to TestClock and TestInstant#409
Open
azarovalex wants to merge 2 commits into
Open
Add missing availability annotations to TestClock and TestInstant#409azarovalex wants to merge 2 commits into
azarovalex wants to merge 2 commits into
Conversation
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.
Member
|
@swift-ci please test |
The compiler crashes on `MultiProducerSingleConsumerAsyncChannel.Source!` (IUO on an unbound generic member inside a closure). Spell out the generic arguments to sidestep the bug.
azarovalex
commented
Apr 17, 2026
| ) | ||
| let channel = channelAndSource.takeChannel() | ||
| var source: MultiProducerSingleConsumerAsyncChannel.Source! = consume channelAndSource.source | ||
| var source: MultiProducerSingleConsumerAsyncChannel<Int, Never>.Source! = consume channelAndSource.source |
Author
There was a problem hiding this comment.
this is (hopefully) a workaround for compiler crash: swiftlang/swift#88530
Author
There was a problem hiding this comment.
my fix for compiler crash was merged but "nighly" docker image used by CI is quite old so let's just keep this change
FranzBusch
approved these changes
Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
platforms:field was removed from Package.swift in favor of availability annotations (Move platform requirements to availability annotations #348),TestClockandTestInstantprotocols inAsyncSequenceValidation/Clock.swiftwere missed.platforms:, SwiftPM's default deployment target depends on the toolchain. Nightly/dev toolchains (used by ci.swift.org) default to macOS 10.13, which is below the macOS 10.15 minimum forasync/await. Xcode release toolchains default to a higher target, which is why this doesn't reproduce locally with a stockswift build.@available(AsyncAlgorithms 1.0, *)to both protocols, matching every other public declaration in the module.Reproducing locally
Test plan
swift buildsucceeds locally