I found a solution on the swift forums - while the Apple team is working on properly backporting the Swift Concurrency module you need to run the server as:
swift run --configuration debug -Xlinker -rpath -Xlinker "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.5/macosx"
So it can find the Concurrency module inside the default macOS SDK
@icanzilb Is there an update on this issue?
I am seeing the same errors posted above and I am running Monterey and Xcode 13.0. I also tried the solutions in the comments and that did not work as well. Thanks!
I’m a little confused myself to be honest, since you have macOS 12 SwiftNIO should be compiling just fine…
What I notice is that the backwards compatibility of the Concurrency module was introduced in Swift 5.5.2 and you have 5.5 so that might be hitting some edge case in the conditional compilations in SwiftNIO.
So yes I installed the latest Xcode but my command-line tools were pointing to Xcode 13.0, not Xcode 13.2.1, and changing that fixed it for me. Changed it under Xcode → Preferences → Locations. Thanks for your help!
I’m gonna go on a limb here and guess that the error message saying “unexpected character in prerequisites” is about those colons in the folder names. Can you check out the repo is a folder with a simpler name like “swiftconcurrrency” and try again?
This error means there is a problem on the server side. A server error can be caused by any number of things from uploading the incorrect file to as bug in a piece of code. This error response is a generic “catch-all” response.
Tips to Fix the Server Error
Backing Up Your Site
Clear your browser cookies and cache
Reload or Refresh the Webpage
/Users/alex/Desktop/concurrency_files/00-book-server/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Directive.swift:230:14: error: ambiguous use of ‘split(separator:maxSplits:omittingEmptySubsequences:)’
self.lazy.split(separator: “\”).reduce(into: “”) { (result, part) in
^
Swift.Sequence:2:40: note: found this candidate @inlinable public __consuming func split(separator: Self.Element, maxSplits: Int = Int.max, omittingEmptySubsequences: Bool = true) → [ArraySlice<Self.Element>]
^
Swift.Collection:2:40: note: found this candidate @inlinable public __consuming func split(separator: Self.Element, maxSplits: Int = Int.max, omittingEmptySubsequences: Bool = true) → [Self.SubSequence]
^
/Users/alex/Desktop/concurrency_files/00-book-server/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Directive.swift:230:14: error: ambiguous use of ‘split(separator:maxSplits:omittingEmptySubsequences:)’
self.lazy.split(separator: “\”).reduce(into: “”) { (result, part) in
^
Swift.Sequence:2:40: note: found this candidate @inlinable public __consuming func split(separator: Self.Element, maxSplits: Int = Int.max, omittingEmptySubsequences: Bool = true) → [ArraySlice<Self.Element>]
^
Swift.Collection:2:40: note: found this candidate @inlinable public __consuming func split(separator: Self.Element, maxSplits: Int = Int.max, omittingEmptySubsequences: Bool = true) → [Self.SubSequence]
^
/Users/alex/Desktop/concurrency_files/00-book-server/.build/checkouts/vapor/Sources/Vapor/HTTP/Headers/HTTPHeaders+Directive.swift:230:14: error: ambiguous use of ‘split(separator:maxSplits:omittingEmptySubsequences:)’
self.lazy.split(separator: “\”).reduce(into: “”) { (result, part) in
^
Swift.Sequence:2:40: note: found this candidate @inlinable public __consuming func split(separator: Self.Element, maxSplits: Int = Int.max, omittingEmptySubsequences: Bool = true) → [ArraySlice<Self.Element>]
^
Swift.Collection:2:40: note: found this candidate
and so on
XCode Version 14.0.1 (14A400),
swift-driver version: 1.62.8 Apple Swift version 5.7 (swiftlang-5.7.0.127.4 clang-1400.0.29.50)
Target: x86_64-apple-macosx12.0