Building for debugging...
Build complete! (0.09s)
OS error
My OS is: 12.3.1, I download the latest Swift packet swift-5.7 and did export TOOLCHAINS=swift, so my swift version is /Library/Developer/Toolchains/swift-5.7-DEVELOPMENT-SNAPSHOT-2022-06-04-a.xctoolchain/usr/bin/swift-version
Should the package run or not?
for await line in stream.debounce(for: .seconds(0.5)) { // 'debounce(for:tolerance:)' is only available in macOS 9999 or newer
print("line: \(line)")
}
It appears that you're attempting to use a swift.org toolchain that has the old 9999 availability for Clock and Duration, as well as macOS 12.x, which isn't supported. The new standard library types and hence the async algorithms features that use them require macOS 13.0 (currently in beta release).
As @scanon mentioned -- 9999 availability is what is set on nightly builds on swift.org, you can use those toolchains but you need to disable those availability checks with -Xfrontend -disable-availability-checking, and you can add this in Xcode in Swift extra compiler flags, or via SwiftPM on command line as swift build -Xswiftc -Xfrontend -Xswiftc -disable-availability-checking.
Though the real answer is to get an up-to-date OS and use its OS/toolchain/Xcode instead.