Realm-cocoa: Carthage: "Incompatible Swift version - framework was built with 5.0"

Created on 18 Apr 2019  路  3Comments  路  Source: realm/realm-cocoa

!!! MANDATORY TO FILL OUT !!!

Goals


Install Realm using Carthage

Expected Results


Framework file to appear in Carthage->builds folders

Actual Results

I am getting the following error *Incompatible Swift version - framework was built with 5.0 (swiftlang-1001.0.69.5 clang-1001.0.46.3) and the local version is 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)." *

Steps to Reproduce


By trying to install Realm using Carthage

Code Sample

Version of Realm and Tooling


Realm framework version: trying to install "v3.14.1"

Realm Object Server version: ?

Xcode version: XCode - v 10.2.1

iOS/OSX version: iOS

Dependency manager + version: ?

O-Community T-Help

Most helpful comment

When using a newly released version of Xcode you'll have to build libraries from source (by passing --no-use-binaries to carthage update) until a new version of Realm comes out which has pre-built binaries for that Xcode version.

All 3 comments

When using a newly released version of Xcode you'll have to build libraries from source (by passing --no-use-binaries to carthage update) until a new version of Realm comes out which has pre-built binaries for that Xcode version.

@tgoyne Out of curiosity: Shouldn't Swift 5 ABI stability mean that this should not happen anymore? Or is this a Carthage bug? Current ABI stability only applies for run time, not compile time 馃槗 So we'll need to wait for module stability.

I haven't been following the module stability discussions super closely, but last I saw they didn't really consider supporting the Carthage use-case of shipping prebuilt binaries just to save compile time to be a major priority. It comes with some tradeoffs, inhibits some optimizations, and requires additional work on the side of the library author, and their primary focus is on making use-cases where you can't just compile the library and application with the same compiler (e.g. because the library is shipped with the system) possible.

If it turns out that the module stability work does let us stop having to ship separate libraries for every Xcode version without any major downsides I imagine we'll jump on that as the status quo is a pretty big headache.

Was this page helpful?
0 / 5 - 0 ratings