Swift run error macOS 13.1

I may have made a mistake, I upgraded to 13.1 beta and got the following error, is it possible to fix?

00-book-server % uname -a

Darwin iHogiMacStudio.local 22.2.0 Darwin Kernel Version 22.2.0: Sun Oct 16 18:09:52 PDT 2022; root:xnu-8792.60.32.0.1~11/RELEASE_ARM64_T6000 arm64

00-book-server % swift run
Building for debugging…
/Volumes/BigSurDev/Develop/Kodeco/Concurrency/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]
^
/Volumes/BigSurDev/Develop/Kodeco/Concurrency/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]
^
[124/125] Compiling Vapor NilIgnoring.swift

I’m running macOS 13 with Xcode 14.1 here and the server builds and runs for me. Can you make sure you have an up to date version of the code from GitHub - kodecocodes/mcon-materials: The projects and materials that accompany the Modern Concurrency in Swift book please?

Just in case you can try deleting first your ‘.build’ folder inside the server folder — to make sure you don’t have any old checkouts of Vapor.

1 Like

Fixed, needed to blow away the repository and clone, little confusing at its still RayWenderlich on GitHub and not Kodeco.

Glad you figured it out, it’s a big migration so certainly there are still few loose ends