JetForMe
(Rick M)
1
tl;dr: I don’t know how to fix this so I can build Vapor in Xcode 14b3.
I’m running into an issue with Xcode 14b3:
…/SourcePackages/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]
self.lazy is LazySequence<Substring>.
The two calls seem to differ only in their return types, and they belong to Sequence and Collection. Near as I can tell, Substring is a Collection, but I have no idea why the compiler is complaining here.
2 Likes
iPera
(Miroslav)
2
Try with this:
rm -Rf .build
rm Package.resolved
swift run --configuration debug -Xlinker -rpath -Xlinker "$(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.7/macosx"
2 Likes
jon
3
I am seeing the same issue for my Vapor project with Xcode 14 GM. I tried the suggested commands but this fixes nothing. Did you manage to sort this out?
JetForMe
(Rick M)
4
I think the commands above fixed it for me.
jon
5
Thanks. I fixed it with :
update to latest package versions (in Xcode) then on command line:
swift package update
Then did a clean and build
Phew.
2 Likes
Daniel
(Daniel Berezhnoy)
7
Thank you! This worked for me.