GithubHelp home page GithubHelp logo

Comments (3)

AliSoftware avatar AliSoftware commented on July 20, 2024 1

Hi

This is because the pre-build version of Reusable we provide was built with a Swift 4.2 compiler. Until Swift is ABI stable, every framework has to be recompiled every time a new Swift compiler version is released. (This is not specific to Reusable and is true for any OSS library)

The problem with this is that if we fix it by recompiling the pre-built framework for Reusable with a Swift 4.2.1 compiler, to provide a pre-built framework for those using this version of Swift, it will break for people still using Swift 4.2 in their project: we can't fix it for everyone, if we provide a pre-build version for some, it will break for others

For you the solution is simple: don't use the pre-built version, and instead ask Carthage to build Reusable from source. There's a dedicated flag in Carthage for this, exactly for this purpose, called --no-use-binaries iirc, that you can use to avoid this ABI mismatch issue in your case.

Something that's strange though is that Carthage is supposed to detect such Swift version mismatch when trying to use a pre-built binary of an OSS library in your Cartfile… and in such case, automatically switch to compile it from source instead of using the pre-built version. So it should indeed tell you (just informative message, not a fatal error message) that the pre-built framework it tried to use was not compatible with your compiler — so, like what you see in your console — and skip the usage of the pre-build framework… but it should then continue and fallback to building it from source instead, and end up installing Reusable in your project properly in the end

This behavior is documented and explained here in their documentation and README.
So if I understand what you described in your issue correctly, and it instead stopped and failed to install Reusable completely without any fallback to compiling from source… then I'm not sure why Carthage doesn't do that in your case.

Maybe @ikesyo might have an idea? Otherwise, maybe worth opening an issue in the Carthage repo about that automatic fallback not working in your case? and in the meantime, you should be able to use the --no-use-binaries flag I mentioned above when invoking Carthage anyway.

from reusable.

ikesyo avatar ikesyo commented on July 20, 2024

Thanks for the detailed write-up @AliSoftware! It's totally correct; Carthage automatically tries to build from the source if the prebuilt binary is incompatible with your local Xcode version. Additionally, from 0.30.1 Carthage also outputs the following message to make the situation clear: Falling back to building from the source.

Maybe your Carthage version is outdated, so could you please try with the newest Carthage version? (0.31.2 is the latest)

from reusable.

AliSoftware avatar AliSoftware commented on July 20, 2024

Closing for lack of activity; the OP was likely using an outdated version of Carthage.

from reusable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.