-
-
Notifications
You must be signed in to change notification settings - Fork 624
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
Error when building using swiftenv
#1065
Comments
This suggests that your command line tools are set to a version of Xcode that is using Swift version 5.3, which would be something like Xcode 12.3.. Is that the case? Can you run You can change it using |
swift-driver version: 1.45.2 swift-driver version: 1.45.2 swift-driver version: 1.45.2 Apple Swift version 5.6 (swiftlang-5.6.0.323.62 clang-1316.0.20.8)
Target: arm64-apple-macosx12.0
Xcode 13.3
Build version 13E113 I only have Xcode 13.3 installed |
Interesting. Please also try running Mint with
|
Sorry, I misread the last part:
What version had you specified in If your |
I changed |
Ahhhh I see! Sorry about that, I'm not too familiar with the file as I've never used it. Do you maybe use something like swiftenv then? I'm just a little confused because I don't think that I have ever used anything that actually checks the .swift-version file before. We can submit a PR to bump this file up to 5.5, which it probably should have been as part of #1049, I hope that can solve your overall problem? |
I just corrected the file so that the version is now set to 5.5. Please let me know if this solves your problem? |
I tried it and first encountered an error:
Then I installed Swift version 5.5 with swiftenv:
Now it's fail on building:
|
Right I see, thanks again! So Did the same thing happen using Swift 5.6 installed via |
swiftenv
Yes, the same error when using Swift 5.6 |
Ok thanks for confirming. In that case, it looks like these issues are due to using a different Swift toolchain than the one included in Xcode. I'm not familiar with |
I am trying to install Sourcery via mint, but I get an error:
If clone a project (tag 1.8.1) and try to build it, the error will be identical:
swift build -c release /Users/t.shafigullin/Desktop/Swift/Sourcery: error: package at '/Users/t.shafigullin/Desktop/Swift/Sourcery' is using Swift tools version 5.5.0 but the installed version is 5.3.0
I tried changing the Swift version to 5.6 in the
.swift-version
file and now the build was successful. This does not seem to be an ideal solution, as it would require a minimum version of Xcode 13.3Do you have any better ideas?
The problem seems to have occurred after upgrading to Xcode 13.3
The text was updated successfully, but these errors were encountered: