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
When I try âswift runâ, I get:
error: terminated(1): /usr/bin/xcrun --sdk macosx --show-sdk-platform-path output:
xcrun: error: unable to lookup item âPlatformPathâ from command line tools installation
xcrun: error: unable to lookup item âPlatformPathâ in SDK â/Library/Developer/CommandLineTools/SDKs/MacOSX.sdkâ
For context, Iâm running xcode version 14.3, and âswift --versionâ gives me:
Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)
Target: arm64-apple-darwin22.5.0
Any idea on solving the âswift runâ error? Iâm following the serverside swift with vapor book, version 3.
Thanks!
Iâm getting the following errors after âswift runâ:
patvdp@MiniPat 00-book-server % rm -Rf .build
patvdp@MiniPat 00-book-server % swift run
Fetching GitHub - vapor/vapor: đ§ A server-side Swift HTTP web framework. from cache
warning: âvaporâ: skipping cache due to an error: Couldnât fetch updates from remote repositories:
Unknown option: -C
usage: git [âversion] [âhelp] [-c name=value]
[âexec-path[=]] [âhtml-path] [âman-path] [âinfo-path]
[-p|âpaginate|âno-pager] [âno-replace-objects] [âbare]
[âgit-dir=] [âwork-tree=] [ânamespace=]
[]
Fetched GitHub - vapor/vapor: đ§ A server-side Swift HTTP web framework. (19.51s)
error: Couldnât get the list of tags:
Unknown option: -C
usage: git [âversion] [âhelp] [-c name=value]
[âexec-path[=]] [âhtml-path] [âman-path] [âinfo-path]
[-p|âpaginate|âno-pager] [âno-replace-objects] [âbare]
[âgit-dir=] [âwork-tree=] [ânamespace=]
[]
Iâm running Ventura 13.5, Xcode 14.3.1.
Swift version:
swift-driver version: 1.75.2 Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100)
I just started reading the book and trying to run the server.
I get these errors:
/Users/nsd/Desktop/mcon-materials/00-book-server/.build/checkouts/vapor/Sources/Vapor/HTTP/Server/HTTPServer.swift:380:54: error: reference to captured var 'application' in concurrently-executing code
application: application!,
^
/Users/nsd/Desktop/mcon-materials/00-book-server/.build/checkouts/vapor/Sources/Vapor/HTTP/Server/HTTPServer.swift:388:46: error: reference to captured var 'application' in concurrently-executing code
application: application!,
^
M1 Pro
macOS 14.2.1
Xcode 15.2
swift --version:
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Target: arm64-apple-macosx14.0