-
I pulled the code for episode #189 (Tour of Parser=Printers: API Clients for Free), and had 2 problems I don't understand trying to build the Run scheme for the Server in Xcode 13.3.1. The first is that configure.swift the compiler complains that import Vapor won't work because: I can fix this problem by changing platforms in the Package.swift file for the Server to: Which is annoying. But I guess understandable. The compiler also complains that this code in the configure function in configure.swift: is wrong for the following reason: Cannot assign value of type 'AnyParserPrinter<URLRequestData, SiteRoute>' to type 'SiteRouterKey.Value' (aka 'AnyParserPrinter<URLRequestData, SiteRoute>') It says that SiteRouterKey.Value is an AnyParserPrinter<URLRequestData, SiteRoute> but it doesn't allow an AnyParserPrinter<URLRequestData, SiteRoute> to be assigned to it? This last problem is a mystery to me. Any help would be appreciated. This is on a MacBook Pro (13-inch, M1, 2020), Monterery 12.3.1. Xcode 13.3.1 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
One note. I rechecked out the code for the episode and the issue about Vapor having the wrong minimum deployment target is not reproducible. This is after restarting Xcode. The second problem remains. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the report! When we recorded the episode we used _URLRouting that is vended from swift-parsing, but when we released the episode we also released the official non-underscored URLRouting in the swift-url-routing repo. So this code sample was technically using two versions of the routing library at once, causing ambiguity. I have now (c489eb5) updated all _URLRouting to be just URLRouting and it should work. |
Beta Was this translation helpful? Give feedback.
Thanks for the report!
When we recorded the episode we used _URLRouting that is vended from swift-parsing, but when we released the episode we also released the official non-underscored URLRouting in the swift-url-routing repo. So this code sample was technically using two versions of the routing library at once, causing ambiguity.
I have now (c489eb5) updated all _URLRouting to be just URLRouting and it should work.