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.