GithubHelp home page GithubHelp logo

Comments (17)

ikesyo avatar ikesyo commented on July 20, 2024 2

Hmm I understand now that the issue comes from the fact that this project's Carthage support is achived by the CocoaPods-generated xcodeporj file and the project produces frameworks in a different directory from Carthage expectation.

from reusable.

AliSoftware avatar AliSoftware commented on July 20, 2024

I'm not sure what changes would be needed for Swift 4, it seems to me that Reusable doesn't use anything that changed in Swift 4 that would require a migration, so it should already work in Swift 4 out of the box.

What errors are you seing when using in Swift 4 that would suggest that it isn't compatible?!

from reusable.

muukii avatar muukii commented on July 20, 2024

@mqch295
@AliSoftware

IMO,
I think the framework built by Swift3 will be not compatible caching with Carthage.
So, We need to upgrade to Swift4.
Thank you.

*** Skipped installing Reusable.framework binary due to the error:
	"Incompatible Swift version - framework was built with 3.0.2 (swiftlang-800.0.63 clang-800.0.42.1) and the local version is 4.0 (swiftlang-900.0.65 clang-900.0.37)."

from reusable.

AliSoftware avatar AliSoftware commented on July 20, 2024

@muukii That's more of a Carthage-related issue (all libraries with a pre-built binary built with Swift 3 will have the same issue).
You can just use --no-use-binaries with Carthage to avoid using the pre-built binary. That's the recommended way by Carthage anyway

Given that Swift doesn't have ABI stability yet, it has little sense to provide a pre-built binary — especially during those transitions between Swift versions.
If we provide a pre-built Swift 4 binary, users still using Swift 3 (and there are still many people not ready to migrate due to their internal roadmap) will complain, and the same will be true in the opposite direction (I already experienced this kind of war with my other OSS libraries, we can't make everybody happy anyway when having pre-built binaries at least until we have ABI stability in Swift).

So I'll probably not provide a pre-built binary (.framework.zip) in the future releases of Reusable, so that Carthage always builds from Source (and thus is built by Carthage using the Swift version you're currently using in your project). And for the current release, for people using Swift 4 you can simply use --no-use-binaries

from reusable.

muukii avatar muukii commented on July 20, 2024

@AliSoftware
Okay. Thanks.
Currently, If we want to build with Swift4, we should use --no-use-binaries.
And, Migrate to Swift 4 when Swift 3's support expires?

from reusable.

AliSoftware avatar AliSoftware commented on July 20, 2024

@muukii There's nothing to do in Reusable's side to support Swift 4 if I'm not mistaken, as the source code itself is already compatible. The only problem is when you use Carthage and with pre-compiled binaries.

When you use --no-use-binaries, Carthage will compile the Reusable source code itself — so using the Swift 3 mode if you use the Swift 3 compiler, and using Swift 4 mode if you use Swift 4 in your project, and as Reusable can be built both as Swift 3 & Swift 4 it will work in both cases.

from reusable.

muukii avatar muukii commented on July 20, 2024

@AliSoftware
Okay, I understand!
Thank you!

from reusable.

floriangbh avatar floriangbh commented on July 20, 2024

Hello !

Since Carthage 0.26 I'm not able to build Reusable ..
I got the following error :

Failed to write to /Users/*/Documents/App-iOS/*/Carthage/Build/iOS/Reusable.framework: Error Domain=NSCocoaErrorDomain Code=260 "The file “Reusable.framework” couldn’t be opened because there is no such file." UserInfo={NSURL=file:///Users/*/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/Reusable/4.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Reusable-iOS/BuildProductsPath/Release-iphoneos/Reusable.framework, NSFilePath=/Users/*/Library/Caches/org.carthage.CarthageKit/DerivedData/9.0_9A235/Reusable/4.0.1/Build/Intermediates.noindex/ArchiveIntermediates/Reusable-iOS/BuildProductsPath/Release-iphoneos/Reusable.framework, NSUnderlyingError=0x7feb68e14d60 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}

Even with a clean cache (Carthage & Derived) or with a clean machine. This error occur only with Reusable.

Any idea ?

Thanks

from reusable.

AliSoftware avatar AliSoftware commented on July 20, 2024

Did you use --no-use-binaries with Carthage to build it as explained above?

Ping @ikesyo any idea?

from reusable.

floriangbh avatar floriangbh commented on July 20, 2024

carthage update Reusable --platform iOS --no-use-binaries.

I just tried again with 0.26.1it didn't work. I downgraded to 0.25 and it work again :-)

from reusable.

ikesyo avatar ikesyo commented on July 20, 2024

That should be fixed in Carthage 0.26.1. Homebrew formula will be updated soon: Homebrew/homebrew-core#19392.

from reusable.

floriangbh avatar floriangbh commented on July 20, 2024

That is fixed in Carthage 0.26.1.

I have already tried (from the .pkg install) with the 0.26.1 and it didn't work.

from reusable.

AMatecki avatar AMatecki commented on July 20, 2024

@ikesyo is it fixable by Carthage?

from reusable.

floriangbh avatar floriangbh commented on July 20, 2024

This is now great with the 0.26.2, thanks !

from reusable.

liowu avatar liowu commented on July 20, 2024

When pod install, It doesn't work in swift4.0.

from reusable.

AliSoftware avatar AliSoftware commented on July 20, 2024

@liowu we'll need more info about the error you have to help you.

from reusable.

AliSoftware avatar AliSoftware commented on July 20, 2024

Closing due to inactivity, and as Swift 4.1 and 4.2 support have been added since then.

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.