RxSwiftExt
RxSwiftExt copied to clipboard
Carthage failed to build
Hello, I tried to include RxSwiftExt in my carthfile and had some errors, my env:
swift --version
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5)
Target: x86_64-apple-darwin18.5.0
Xcode 10.2.1 (10E1001)
swiftlint 0.32.0
carthage 0.33.0
My carthfile:
github "Alamofire/Alamofire" == 4.8.2
github "Alamofire/AlamofireImage" == 3.5.2
github "Moya/Moya" ~> 13.0
github "ReactiveX/RxSwift" "5.0.1"
github "ReactiveCocoa/ReactiveSwift" "5.0.1"
github "RxSwiftCommunity/RxSwiftExt" "5.0.0"
github "RxSwiftCommunity/RxGesture" "2.2.0"
github "RxSwiftCommunity/RxDataSources" "4.0.1"
Xcode throws a lots of Use of undeclared type 'Element'.
If it says "undeclared type" element it seems to me you didn't properly update your Carthage dependencies with carthage update.
Care to share your Cartfile.resolved ?
Here it is:
github "Alamofire/Alamofire" "4.8.2"
github "Alamofire/AlamofireImage" "3.5.2"
github "Moya/Moya" "13.0.1"
github "ReactiveCocoa/ReactiveSwift" "5.0.1"
github "ReactiveX/RxSwift" "5.0.1"
github "RxSwiftCommunity/RxDataSources" "4.0.1"
github "RxSwiftCommunity/RxGesture" "2.2.0"
github "RxSwiftCommunity/RxSwiftExt" "5.0.0"
github "antitypical/Result" "4.1.0"
github "danielgindi/Charts" "v3.1.1"
github "thang2410199/SkeletonView" "0e4855d266658a9f11ae5f76496052013ab12caa"
I run carthage update --cache-builds --platform iOS
FWIW: This weekend I have experienced quite a few (understatement) problems updating my Rx libraries to the latest versions (Swift 5, using Carthage). I ended up removing dependency on RxSwiftExt, and now my project builds fine again. Unfortunately I did not keep the logs, to help you further with what happened, but I'd like to share that I also experienced issues with updated carthage.
@thang2410199 Please provide a reproducible project with the issue. Thanks.
I have the same problem with Xcode 10.2.1 ....
IntermediateBuildFilesPath/RxSwiftExt.build/Release-iphoneos/RxSwiftExt-iOS.build/Objects-normal/arm64/zipWith.bc Command CompileSwift failed with a nonzero exit code
** ARCHIVE FAILED **
The following build commands failed: CompileSwift normal armv7 CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler CompileSwift normal arm64 (3 failures)
@freak4pc Sorry I forgot to check the thread, I will provide a sample soon.
I tried again today, build process successes on both sample and prod project.
Ok, so can we close this?
@freak4pc I'm still having problems. what are the versions required ?/
I'm running Xcode10.2.1
carthage version 0.33.0
swiftlint 0.32.0
Apple Swift version 5.0.1 (swiftlang-1001.0.82.4 clang-1001.0.46.5) Target: x86_64-apple-darwin18.6.0
Ok.
Seems like we have to include RxRelay in your frameworks.
add the framework to Link Binary with Libraries
then add new path to your Run script
$(SRCROOT)/Carthage/Build/iOS/RxRelay.framework
Yeah, that makes sense not only in the context of RxSwiftExt, but also RxCocoa itself. Since RxCocoa depends on RxRelay.
I am running into this problem today, with similar problems as @Ronaldoh1 when using Carthage. Everything works fine if I remove RxSwiftExt- I also tried this with including ONLY RxSwift and RxSwiftExt in my Cartfile and building from scratch, and the error persists.
Build file output:
** ARCHIVE FAILED **
The following build commands failed: CompileSwift normal armv7 CompileSwiftSources normal armv7 com.apple.xcode.tools.swift.compiler CompileSwift normal arm64 CompileSwiftSources normal arm64 com.apple.xcode.tools.swift.compiler (4 failures)
I also noticed these errors in the build log:
Project/Carthage/Checkouts/RxSwiftExt/Source/RxSwift/fromAsync.swift:89:29: error: type 'Result<PrimitiveSequence<SingleTrait, Self.Element>.Element, Error>' (aka 'Result<Self.Element, Error>') has no member 'error'
single(.error(FromAsyncError.inconsistentCompletionResult))
Project/Carthage/Checkouts/RxSwiftExt/Source/RxSwift/fromAsync.swift:87:29: error: type 'Result<PrimitiveSequence<SingleTrait, Self.Element>.Element, Error>' (aka 'Result<Self.Element, Error>') has no member 'error'
single(.error(error))
I solved my problem: specify for Carthage to use RxSwift version 5.1.1 instead of newest 6.x
Thanks ! I'll take a look. This project doesn't target RxSwift 6 yet since it's in RC1.