RACCommunity / Rex

ReactiveCocoa Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rex swift2 branch gives error on carthage build

avalanched opened this issue · comments

commented

my cartfile:

 github "neilpa/Rex" "swift2"

my xcodebuild version:

$ xcodebuild -version
Xcode 7.0
Build version 7A218

my log file:

https://www.dropbox.com/s/wa4ujjm6fdqembc/carthage-xcodebuild.OWgLIO.log?dl=0

I'm getting the same segmentation fault 11. Condensed output is:

build commands failed:
CompileSwift normal x86_64 app/Carthage/Checkouts/Rex/Source/Foundation/Association.swift
CompileSwift normal x86_64 app/Carthage/Checkouts/Rex/Source/Signal.swift
CompileSwift normal x86_64 app/Carthage/Checkouts/Rex/Source/UIKit/UIBarButtonItem.swift
  CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(4 failures)
  ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks'
  ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk/Developer/Library/Frameworks'
  ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks'
  ld: warning: directory not found for option '-F/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk/Developer/Library/Frameworks'
  app/Carthage/Checkouts/Rex/Source/Foundation/Association.swift:65:27: error: cannot invoke 'start' with an argument list of type '(next: T -> ())'
  app/Carthage/Checkouts/Rex/Source/Signal.swift:16:32: error: extra argument 'error' in call
  app/Carthage/Checkouts/Rex/Source/UIKit/UIBarButtonItem.swift:22:36: error: extraneous argument label 'next:' in call
  <unknown>:0: error: unable to execute command: Segmentation fault: 11
<unknown>:0: error: swift frontend command failed due to signal (use -v to see invocation)
  A shell task failed with exit code 65:
  ** BUILD FAILED **


  The following build commands failed:
  CompileSwift normal x86_64 app/Carthage/Checkouts/Rex/Source/Foundation/Association.swift
  CompileSwift normal x86_64 app/Carthage/Checkouts/Rex/Source/Signal.swift
  CompileSwift normal x86_64 app/Carthage/Checkouts/Rex/Source/UIKit/UIBarButtonItem.swift
  CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(4 failures)

Is that the Xcode 7 GM build? I haven't tried that since they released it, last update was the beta 6 I think. I'll take a look though.

Oh, it's picking up an incompatible version of ReactiveCocoa. There were some recent breaking changes and I haven't updated Rex but the cartfile is pointing at the head of the swift2 branch.

@neilpa Yes, it is the GM build. Thanks for the quick response 😀.

commented

GM build for me also

Can you try the explicit-rac-dep branch? I need to start using explicit tags until there are proper versions of RAC4

commented

gives the following

*** Cloning Rex
*** Cloning Alamofire
*** Cloning ReactiveCocoa
*** Cloning Result
*** Cloning Result
*** Cloning Result
*** Cloning Result
*** Cloning Result
Could not pick a version for github "ReactiveCocoa/ReactiveCocoa", due to mutually incompatible requirements:
    "swift2"
    "5e75726b"

I get stuck on Fetching Result. Deleted DerivedData as well with same issue

@avalanched Can you share your Cartfile and Cartfile.resolved? That error means that someone else is explicitly depending on the head of the swift2 branch. The problem is that we're using bleeding edge RAC which isn't yet versioned. So carthage has no way to resolve these dependencies and verify compatibility unless they are identical. This is a general problem with transitive dependencies across frameworks where breaking changes are ongoing.

However, I was able to create a new project specifying just github "neilpa/Rex" "explicit-rac-dep" and have it build cleanly.

@nanoxd You may need to nuke ~/Library/Caches/org.carthage.CarthageKit/dependencies/Result

Also, I'll look at getting a baseline 4.0-alpha.1 of RAC released in the next few days. This should help isolate breaking changes across libraries that depend on RAC but want to target Swift 2 without having to point at arbitrary commits.

commented

i deleted all caches before:

my resolved file:

github "Alamofire/Alamofire" "2.0.0"
github "antitypical/Result" "a9940162d201511f8f13ccb4e2eb57f3a3ca8f89"
github "ReactiveCocoa/ReactiveCocoa" "73eeb87b9eb5a95a661524f1688161dbfddced4c"
github "neilpa/Rex" "aa7b578489bd9b26d9dff44e87ba261910034cdb"
commented

one step further, i had indeed a dependency on reactivecocoa, when i deleted that, it was not complaining about that error anymore.

but now i get the following, but i'm guessing this due to the Result framework,

xcodebuild: error: Scheme Result-tvOS is not currently configured for the build action.

although i did use --platform iOS

Does your top-level project have a build target for tvOS?

commented

no not at all:

and i used carthage update --platform iOS

my resolved file

github "antitypical/Result" "0.6-beta.1"
github "ReactiveCocoa/ReactiveCocoa" "5e75726bf232b76b17169b3d9c9c64d1fd6bffbe"
github "neilpa/Rex" "bf1a994f330582179167cf325385eaf31177f040"

After nuking my Carthage cache, removing the stanza for ReactiveCocoa's swift2 branch, I get the same error for tvOS using the same command of carthage update --platform iOS

What version of carthage are you using?

commented
$ carthage version
0.9.1

I bet that's the problem, I'm still on 0.8.0 and am able to successfully build.

xcodebuild: error: Scheme Result-tvOS is not currently configured for the build action.

I wonder if Carthage is parsing all schemes before filtering for the specified platform/s, so failing early because Xcode 7.0 can't parse the tvOS scheme.

I merged #35 which should resolve this with the caveat that you'll need to use --no-use-binaries when updating. Let me know if that works for you.

I tried updating using carthage update --platform iOS --no-use-binaries but still receive on both the original project and a clean project:

*** Fetching Rex
*** Fetching ReactiveCocoa
*** Fetching Result
*** Checking out Result at "76f9a972ed61ff872b731460bc610c8acbfae58c"
*** Checking out ReactiveCocoa at "v4.0-alpha.1"
*** Checking out Rex at "df4616a4a20379539490d11468920284dbabf716"
A shell task failed with exit code 66:
xcodebuild: error: Scheme Result-tvOS is not currently configured for the build action.

Carthage version is 0.9.1 and replicated on version 0.8.0. Contents of Cartfile.resolved:

github "antitypical/Result" "76f9a972ed61ff872b731460bc610c8acbfae58c"
github "ReactiveCocoa/ReactiveCocoa" "v4.0-alpha.1"
github "neilpa/Rex" "df4616a4a20379539490d11468920284dbabf716"

Contents of Cartfile:

github "neilpa/Rex" "swift2"

Hmm, maybe try deleting both ~/Library/Caches/org.carthage.CarthageKit and ~/Library/Developer/Xcode/DerivedData again if you haven't already. I have no clue where that Result-tvOS scheme is coming from otherwise. Commit 76f9a972e for Result was before the tvOS target and scheme were added.

Really wish carthage would print the xcodebuild commands it's running. Would make diagnosing this a lot easier.

I had deleted both of those prior to testing out the update. Surprisingly it works well with a Cocoapods podspec uploaded by @ashfurrow. It appears like it's a Carthage issue.

I would also double check Carthage/Checkouts/Result/Result.xcodeproj/xcshareddata/xcschemes to make sure there isn't a stray scheme in there. Although, I would have no clue how it got there on the clean project.

I did find a tvOS scheme in there. I cleared out the entire Carthage folder and the cache/derived data. Everything's working on my end now. Thanks.

Awesome! Glad that finally fixed it for you.