-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Incompatible Swift version - framework was built with 4.2 and the local version is 4.2.1 #2632
Comments
can you please run
|
The output is Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) |
I'm afraid this is not a bug. This is working as intended. |
And have any guess why is this happening and how to solve it? I can’t find any solution... |
Check the
|
Yes |
So to confirm:
You are absolutely sure you built the framework with the SAME version for Xcode you have currently selected? Please verify the output of
Then paste here the relevant contents of the Then paste here the relevant the output of the following:
|
If you feel like giving this a shot, you can try with the patched build of #2622 available here https://github.com/blender/Carthage/releases/tag/swiftz-cache-invalidation If you don't trust that binary the you can build the PR on your own machine and try. |
Please verify the output of
Then paste here the relevant contents of the -Swift.h in Headers of the binary you are downloading
Then paste here the relevant the output of the following: $ dwarfdump -arch=armv7 --debug-info <path/to/dSYM> | grep AT_producer |
And the contents of the |
I can't find it, where should be it located? |
Actually you don't need it but again this is the problem right here: ... was built with 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1) I'm pretty positive the binary was not built with the same version of Xcode you are using atm. |
I've rebuilt and uploaded .zip again (I have only one version of Xcode installed) and result is the same |
Then I think we have a bug here. Do you want to take a shot at this? It's pretty easy to get started The problem should be around https://github.com/Carthage/Carthage/blob/master/Source/CarthageKit/Xcode.swift#L73 |
I was about to report this same issue as a feature proposal: Support disabling swift version validation. I have a central build machine for producing binary dependencies on Xcode10.0, and a local dev machine that recently updated to Xcode10.1. Ordinarily, we keep these in sync by necessity, but as the compiler occasionally maintains backwards binary compatibility over dot releases, I might upgrade locally earlier than the central machine (I don't control that machine). Swift 4.2 (Xcode 10) binaries seem compatible with 4.2.1 (Xcode 10.1). It would be nice to introduce a flag |
@miibpa I had the same problem. I fixed with |
Thank you @cannaz This solved the issue for me too! |
@miibpa Agree with @sstadelman It will be great to propose a "--no-version-validation" option command. thx |
Yeah especially now that Apple has finally gotten their act together for ABI compatibility. This sort of check loses its meaning and only serves to frustrate since everything needs to be dropped when Apple suddenly decides to make a Swift version bump so that we can make a new Carthage build (which then needs to get run through QE, etc). |
ABI stability is not related to this; which is about runtime. What we want here is Module stability; which is about compile time. I recommend you to check the Swit.org blog entry: https://swift.org/blog/abi-stability-and-more/. |
Oh, you are right! Great...so Apple is not quite done screwing us around yet....but is it safe to say when (if...) module stability ever comes around that this check will be removed? |
It won’t be removed. It will be relaxed for compatible versions. |
I'm sorry guys, I'm a newbie in iOS dev. Can someone explain me how to make it work? I have just exactly everything the same problems. |
@fr33z3 recompile the dependency with the appropriate version of the swift compiler |
"Incompatible Swift version - framework was built with 4.0.2 (swiftlang-900.0.69.2 clang-900.0.38) and the local version is 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)." how to get rid of installation errors? |
@tmspzz is there a way uploaded binary zips can include multiple versions as compiled by different versions of Xcode? Is this something that is already supported? Or that you're considering? Each minor swift version update this is causing major issues as we have 10-20 clients who are requiring me to use various different versions of Xcode so only 10% of them maybe I'm able to make use of pre-compiled binaries without having swift version dependent releases in GitHub :( |
No, it's not supported. I don't think this is desirable.
Is this for private use? Try https://github.com/tmspzz/Rome you can store artifacts per compiler version |
which carthage
:/usr/local/bin/carthagecarthage version
: 0.31.2xcodebuild -version
: Xcode 10.1\Build version 10B61--no-build
no--no-use-binaries
no--use-submodules
no--cache-builds
no--new-resolver
noCartfile
Carthage Output
Actual outcome
Carthage refused update
Expected outcome
Carthage should update my custom binary framework
I'm building my own framework and distributing it as binary, after upgrading to latest Xcode version, I built my framework with
carthage build --no-skip-current
andcarthage archive
and uploaded the .zip file to s3 as usual, but after trying to update dependencies in my projects using my custom framework gives the described output. There is no 4.2.1 option in Swift Language Version inside build settings.The text was updated successfully, but these errors were encountered: