-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trivially enable async/await with Xcode 13.2.1 on Big Sur #2994
Comments
Something like this:
|
Just to clarify this as the PR is closed - 5.5.2 ensures that anyone building on Xcode 13.0 and 13.1 would correctly take an older version of Vapor that worked with these releases. 5.5.2 ensures that the concurrency runtime is bundled with the toolchain otherwise you'd get weird errors |
By "weird errors", do you mean that the final product needs to ensure that the rpath needs to be able to locate the concurrency library? That is correct, but simple to work around. |
A simpler way, if Swift 5.5.2 actually is needed by Vapor, would be to include everything in the manifest in a Something like:
|
Yes if on macOS 13.0 there was no Concurrency runtime to link against so even manually setting an rpath wouldn't help without all kinds of hacks. This has been superseded by #2996 anyway as we need it for some |
Currently Vapor cannot be built with async/await support using Xcode 13.2.1, which is the last version of Xcode supported on macOS Big Sur.
This is despite the fact that if Vapor is built with a later Xcode version, with async/await, it can still run on Big Sur. And also despite the fact that Xcode 13.2.1 contains everything actually needed to build Vapor with async/await.
A simple change to
Package.swift
in Vapor (and related packages like async-kit, fluent and fluent-kit) would fix this issue. An issue that seems to stem from uncertainty about what the swift-tools-version means.Xcode 13.2.1 includes Swift 5.5.2, but the SwiftPM version is still 5.5.0, for reasons unknown to me. (There is a standalone build of Swift 5.5.3 for macOS, with no changes except bumping the versions of both Swift and SwiftPM to 5.5.3. The Swift part of this build can be used with Xcode 13.2.1, but that doesn't affect the SwiftPM support in Xcode.)
I'm not sure why Vapor wants Swift 5.5.2 over Swift 5.5, but if that distinction is important to Vapor (it isn't to Swift-NIO, as some people seem to claim), it can be expressed in the
Package.swift
file, without requiring SwiftPM beyond 5.5.One way is to take advantage of the Swift version supported by the compiler compiling
Package.swift
. I have an example of that in a branch called mergeable-big-sur.The text was updated successfully, but these errors were encountered: