Carthage/Carthage

Improve documentation around interaction between subdependencies which check into `Carthage/Checkouts` and correspondingly-named-but-maybe-different-and-maybe-also-intended-to-override dependencies from elsewhere in the dependency graph and why they don't override.

Open

#2,844 opened on 2019年8月6日

GitHub で見る
 (33 comments) (2 reactions) (0 assignees)Swift (15,179 stars) (1,544 forks)batch import
help wanted

説明

Hi,

I was wondering if Carthage compiles desired versions of subsequent dependencies.

My case is that my project depends on ReactiveSwift and ReactiveCocoa so I have both dependencies in my Cartfile. As I'd love to use Xcode 11 Beta, I require ReactiveSwift ~> 6.1 as this is the first version compilable by Xcode 11.

Problem is that while ReactiveSwift compiles correctly, ReactiveCocoa fails to compile. I assume that when compiling ReactiveCocoa Carthage checkouts ReactiveSwift 6.0.0 as stated in ReactiveCocoa's 10.0.0 Cartfile.resolved. I assume this as calling carthage update in Carthage/Checkouts/ReactiveCocoa and then carthage build in my project makes ReactiveCocoa to compile successfully.

So question is if this behavior is correct when my Cartfile requires ReactiveSwift ~> 6.1 and 6.1 is also fetched according to Carthage log?

Thanks in advance.

  • carthage install method: [ ] .pkg, [x] homebrew, [ ] source
  • which carthage: /usr/local/bin/carthage
  • carthage version: 0.33.0
  • xcodebuild -version: Xcode 11.0 Build version 11M382q
  • Are you using --no-build? No
  • Are you using --no-use-binaries? No
  • Are you using --use-submodules? No
  • Are you using --cache-builds? Yes
  • Are you using --new-resolver? Yes

Cartfile

github "ReactiveCocoa/ReactiveSwift" ~> 6.1
github "ReactiveCocoa/ReactiveCocoa" ~> 10.0

Carthage Output

Jakub-MacBook:tst olejnjak$ carthage update --platform iOS --cache-builds --new-resolver
*** Fetching ReactiveCocoa
*** Fetching ReactiveSwift
*** Checking out ReactiveSwift at "6.1.0"
*** Checking out ReactiveCocoa at "10.0.0"
*** No cache found for ReactiveSwift, building with all downstream dependencies
*** xcodebuild output can be found in /var/folders/lm/syft_2w9151gjr9d844tjg5h0000gn/T/carthage-xcodebuild.c6IZXm.log
*** Building scheme "ReactiveSwift-iOS" in ReactiveSwift.xcworkspace
*** Building scheme "ReactiveCocoa-iOS" in ReactiveCocoa.xcworkspace
Build Failed
	Task failed with exit code 65:
	/usr/bin/xcrun xcodebuild -workspace /private/tmp/tst/Carthage/Checkouts/ReactiveCocoa/ReactiveCocoa.xcworkspace -scheme ReactiveCocoa-iOS -configuration Release -derivedDataPath /Users/olejnjak/Library/Caches/org.carthage.CarthageKit/DerivedData/11.0_11M382q/ReactiveCocoa/10.0.0 -sdk iphoneos ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES archive -archivePath /var/folders/lm/syft_2w9151gjr9d844tjg5h0000gn/T/ReactiveCocoa SKIP_INSTALL=YES GCC_INSTRUMENT_PROGRAM_FLOW_ARCS=NO CLANG_ENABLE_CODE_COVERAGE=NO STRIP_INSTALLED_PRODUCT=NO (launched in /tmp/tst/Carthage/Checkouts/ReactiveCocoa)

This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/lm/syft_2w9151gjr9d844tjg5h0000gn/T/carthage-xcodebuild.c6IZXm.log

Actual outcome Carthage is unable to compile ReactiveCocoa

Expected outcome Should Carthage compile ReactiveCocoa?

コントリビューターガイド