-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fails to compile Xcode 13 RC (note: needs macOS release) #110
Comments
|
|
|
Ok sorry I know what's going on now. This is a weird situation in time where the RC of Xcode assumes that concurrency is provided by the OS -- the Betas did not assume that but this RC does. But the OS with Concurrency has not been released yet, so you can't use the RC Xcode yet. This will just work once the next macOS is released, it will have the next SDK with concurrency and things will just work. |
|
Gotcha, okay. How does that work on linux I wonder? Is concurrency provided on the linux swift toolchains when >=5.5? |
|
On linux (on all non-apple platforms for that matter) everything is included in the toolchains yes. |
|
👍 so just to be clear there is no way to use the new async await stuff with Xcode 13 RC until I've got macOS Monterey is installed? (to use it I'd have to wait for Monterey to drop or use a prior Xcode 13 Beta) |
|
That seems to be the case AFAICS |
|
Since the official Xcode 13 is out and this still seems to prevent compilation for macOS targets other than the unreleased Monterrey, would it make more sense to instead of using #if compiler(>=5.5)use this? #if canImport(_Concurrency)Since technically using concurrency is dependent on the availability of the concurrency library rather than swift 5.5? And even after Monterrey is released compilation would still fail on older macOS targets. Perhaps it would also need to check for 5.5 as well; #if compiler(>=5.5) && canImport(_Concurrency)The only thing I'm wondering is if Regardless; I've opened a PR #111, I'll close it if I'm misguided in my understanding here. |
|
I've been able to get Xcode RC to work by installing the latest swift 5.5 nightly from swift.org. |
|
I assume that's because concurrency is included in the nightly toolchain? That would be great |
|
Commented in the PR; long story short: is the right way to guard code using async/concurrency, but...
I guess it'll stay but we should not "spell it out", it is imported automatically. |
|
Great, all merged so this can be closed. @adam-fowler curious, were you able to get concurrency working with that nightly as well? I downloaded the last swift 5.5 nightly and still get a "async requires macOS 12" error when adding an async function. No error if I'm on trunk development snapshot, but I'd prefer to use Swift 5.5 bundled with concurrency. |
|
@joshuawright11 Yeah I've been running with RC for a while now with a swift 5.5 snapshot. Current one I am using 2021-09-15 |
|
@joshuawright11 You do get a weird thing where the IDE tells you it won't compile, but when you build it, it does compile. It is probably easier to stick with the beta 5 |
|
Ended up rolling with the latest nightly so I didn't need to sprinkle the |
This allows Xcode 13 to still compile on macOS 11 which does not have symbols for Concurrency yet See swift-server/swift-service-lifecycle#110
This allows Xcode 13 to still compile on macOS 11 which does not have symbols for Concurrency yet See swift-server/swift-service-lifecycle#110
This allows Xcode 13 to still compile on macOS 11 which does not have symbols for Concurrency yet See swift-server/swift-service-lifecycle#110
This allows Xcode 13 to still compile on macOS 11 which does not have symbols for Concurrency yet See swift-server/swift-service-lifecycle#110
This allows Xcode 13 to still compile on macOS 11 which does not have symbols for Concurrency yet See swift-server/swift-service-lifecycle#110
Hey folks, trying to build with Xcode 13 RC.
Steps to reproduce
git clone https://github.com/swift-server/swift-service-lifecycle.gitcd swift-service-lifecycleswift buildAnd
swift --versionisAssume the fix is just to delete the(didn't actually fix it, as discussed below)import _Concurrency?The text was updated successfully, but these errors were encountered: