which carthage: /usr/local/bin/carthagecarthage version: 0.33.0xcodebuild -version: Xcode 11.1, Build version 11A1027--no-build? nay--no-use-binaries? nay --use-submodules? nay--cache-builds? nay--new-resolver? nayCartfile
github "michaeleisel/ZippyJSON"
Carthage Output
$ carthage bootstrap
*** No Cartfile.resolved found, updating dependencies
*** Fetching ZippyJSON
*** Fetching JJLISO8601DateFormatter
*** Fetching ZippyJSONCFamily
*** Checking out JJLISO8601DateFormatter at "0.1.2"
*** Checking out ZippyJSON at "0.0.5"
*** Checking out ZippyJSONCFamily at "0.0.2"
*** xcodebuild output can be found in /var/folders/sw/034qgw2d2351s4ljqcj4z_1c0000gn/T/carthage-xcodebuild.PFtSDv.log
*** Downloading JJLISO8601DateFormatter.framework binary at "0.1.2"
*** Downloading ZippyJSONCFamily.framework binary at "0.0.2"
*** Downloading ZippyJSON.framework binary at "0.0.5"
*** Skipped installing ZippyJSON.framework binary due to the error:
"Incompatible Swift version - framework was built with 5.1 (swiftlang-1100.0.38.29 clang-1100.0.20.14) and the local version is 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7)."
Falling back to building from the source
*** Skipped building ZippyJSON due to the error:
Dependency "ZippyJSON" has no shared framework schemes
If you believe this to be an error, please file an issue with the maintainers at https://github.com/michaeleisel/ZippyJSON/issues/new
Actual outcome
Carthage reported that one version of 5.1 is incompatible with another
Expected outcome
Carthage should accept any versions of Swift 5.1+ to be compatible, because of module stability
I'm getting the same error message with the latest Xcode (11.2, 11B52):
Incompatible Swift version - framework was built with 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7) and the local version is 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9).
Are there any known workarounds?
A workaround would be to install an older version of Xcode on your system that uses Swift 5.1 (I believe Xcode 11.1 would work) and use the command line tools from that version of Xcode instead of the command line tools from Xcode 11.2.
It looks like they added some changes a few weeks ago to fix it... they didn鈥檛 work?
@michaeleisel, those changes are about compiling carthage-the-tool, not invocations that carthage makes.
I'll try to get a pull request up today or tomorrow to handle module stability properly on the invocations that Carthage makes.
Here is that pull request: https://github.com/Carthage/Carthage/pull/2902
Same error here after updating to Xcode 11.2.1 with aws-sdk-ios (build with Xcode 11.2 and Swift Compiler 5.1).
Looking forward to this fix. It takes ages to build aws-sdk-ios from scratch
Any idea when this will be fixed? It is causing more impact with the latest Xcode (11.3.1)
It should be already fixed on master
I have same problem on Carthage version 0.34.0
Xcode 11.3.1
any ideas how to solve it? I've tried removing ~/Library/Caches/org.carthage.CarthageKit but still not working
Incompatible Swift version - framework was built with 5.1
While the fix has been merged to master a new release has not been created. To use the latest Carthage with this fix (and others) you would need to build from master at this point.
@DavidBrunow good to hear and thanks for your work. This probably causes million of build time minutes around the planet. for example we are using https://github.com/aws-amplify/aws-sdk-ios which takes about 45 mins to build. So I guess a new release would be awesome for the climate :)
I hope a new release is coming soon.
Thank you David, it worked
git clone https://github.com/Carthage/Carthage.git master
make install
carthage update --platform iOS --no-use-binaries
While the fix has been merged to master a new release has not been created. To use the latest Carthage with this fix (and others) you would need to build from master at this point.
Still no new release build....
Same problem
Incompatible Swift version - framework was built with 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7) and the local version is 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29).
What are the blockers on doing a new release? Who owns that?
@DavidBrunow any chance of a release soon? :)
still getting "Incompatible Swift version - framework was built with 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15) and the local version is 5.2 (swiftlang-1103.0.32.1 clang-1103.0.32.29).
"
any chance it would be resolved soon?
@DavidBrunow any chance of a release soon? :)
Unfortunately I'm not the person that can make that decision but I'm doing what I can to move things forward.
@DavidBrunow fair enough, thanks for your efforts <3. @jdhealy @tmspzz @mdiep could you help us understand what's blocking the release of the fix please? :)
What's the expected behavior for mixing Swift 5.1 and 5.2?
E.g. I just got this (using carthage built from today's master branch):
Incompatible Swift version - framework was built with 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51) and the local version is 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)
I'm not sure if Swift 5.1.x is forward compatible to accept binaries from 5.2.x.
And what about the other direction, Swift 5.2.x consuming a binary framework build with 5.1x? That should technically work, right? (Seems to works with our Cocoapod framework.) Carthage complains here too:
Incompatible Swift version - framework was built with 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9) and the local version is 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51).
PS.: Forward compatibility seems not to work. Using our Cocoapods framework, we got a bunch of errors complaining about _hasMissingDesignatedInitializers - probably the issue metioned here.
We are facing the same issue with a dependency that was built for Swift 5.1.3 (we're using Swift 5.2.2). I can confirm that this is definitely a Carthage issue, since copying the framework manually into the project works fine.
Just a thought... How about reversing the approach? E.g. black-listing known combinations that do not work and let others just pass. --> Less devs complaining about this in the long run. :grin:
I had a problem for compile my project in latest Xcode versions because of Realm framework integrated with Carthage, Emre G眉rses answer in next post solved my problem.
This worked for me: https://stackoverflow.com/questions/46726077/module-compiled-with-swift-4-0-cannot-be-imported-in-swift-4-0-1
+1 on getting this into a release.
I am unable to compile the aws-ios-sdk due to the same error on the CI side as it takes over an hour which times out even 'elite' machines with Bitrise.
Skipped installing aws-sdk-ios.framework binary due to the error:
"Incompatible Swift version - framework was built with 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51) and the local version is 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)."
Falling back to building from the source
+1 for getting this resolved as well. My team works on an SDK for Swift that is deployed through Carthage and we're currently forced to build and release a version-specific version every time a new version of Swift is available. As Xcode has almost monthly releases, we have to constantly release new versions to keep up with Xcode releases due to this issue.
@DavidBrunow @jdhealy thanks for your work getting this fixed, merged and released! My project is working with v0.35.0
Closing. Released in 0.35.0
Using the released 0.35.0 I'm getting this error log now:
Detected Carthage version 0.35.0
*** Downloading binary-only framework ObjectBox at "https://raw.githubusercontent.com/objectbox/objectbox-swift/master/cartspec/ObjectBox.json"
[...]
*** Downloading ObjectBox.framework binary at "1.3.1"
Incompatible Swift version - framework was built with 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53) and the local version is 5.2.2 (swiftlang-1103.0.32.6 clang-1103.0.32.51).
Did the fix not address this issue?
I am still getting this error as well on 0.35.0
@greenrobot It seems your issue is a different one. Your framework was built with a newer version of Swift. AFAIK module stability only guarantees forward-compatibility, not backwards-compatibility, which makes sense, otherwise the Swift would not be able to add new features anymore.
@EmDee I'd be surprised if Apple would break contracts in patch version updates. Is this officially documented? I had a quick look, but didn't find anything.
@greenrobot I'm sure it's documented somewhere, but a quick search only gave me the discussion by Jordan Rose (which is rather official) regarding the forward-compatibility: https://forums.swift.org/t/plan-for-module-stability/14551.
Having said that, when I'm looking at the changes implemented by @DavidBrunow, Carthage should only be checking for both Swift versions being >= 5.1 and including an interface file: https://github.com/Carthage/Carthage/blob/master/Source/CarthageKit/Xcode.swift#L157. So maybe your framework is missing that build flag?
@EmDee Good find! Quite possible that the framework is missing something. If it is, the error message might be considered somewhat misleading. It be nice if it would have a separate error message in that case?
The framework zip actually comes with a couple of .swiftinterface files. E.g. here: Carthage/Build/iOS/ObjectBox.framework/Modules/ObjectBox.swiftmodule/arm64-apple-ios.swiftinterface
Is this ignored?
Separating those cases for which you referenced the code to better identify the reason would really be helpful.
Unfortunately I can鈥檛 answer your question if the file is being ignored or if it even is the correct file or not, without taking a deep dive here.
However, I agree with you that the error message could be more precise here. I鈥檓 sure the maintainers would be more than happy over a pull request.
I also have this issue on 0.35.0 and Xcode 12 beta 3.
I got the same issue on 0.35.0 and XCode 12 beta, pls help to fix. thx
Some problem with Xcode 12.0.1
Need help.
Same on Xcode 12.0.1 with Swift 5.3 on RxSwift which built with Swift 5.2.2
Please reopen this issue until stable release has been released. Issue still there.
Getting this error when trying to carthage bootstrap --platform ios the kickstarter OSS iOS project
"Incompatible Swift version - framework was built with 5.1 (swiftlang-1100.0.270.13 clang-1100.0.33.7) and the local version is 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)."
Xcode 12.3. macOS Catalina
Same issue with RxSwift installation:
"Incompatible Swift version - framework was built with 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5) and the local version is 5.4 (swiftlang-1205.0.26.9 clang-1205.0.19.55)."
Xcode 12.5, Big Sur
Most helpful comment
Same on Xcode 12.0.1 with Swift 5.3 on RxSwift which built with Swift 5.2.2