joshaber / Few.swift

Views as functions of their state.
MIT License
1.08k stars 39 forks source link

Carthage install issue on Xcode 7.1? #99

Closed mwise closed 8 years ago

mwise commented 9 years ago

I'm trying to install Few.swift via Carthage and I'm running into some xcodebuild issues. I'm on Xcode 7.1 (7B91b).

Here's my Cartfile:

github "joshaber/Few.swift" "swift-2"

Here's the output when building iOS:

carthage update --platform iOS
*** Fetching Few.swift
*** Fetching SwiftBox
*** Checking out SwiftBox at "c316daebb98237a0c20c5fc7cb92028f44809861"
*** Checking out Few.swift at "12406946e2b11b3f0848235544ff6aaf97618f6b"
*** xcodebuild output can be found in /var/folders/s6/qx12s0856zg2zhsnx_14sqd40000gn/T/carthage-xcodebuild.ZyIMzF.log
*** Building scheme "SwiftBox-iOS" in SwiftBox.xcodeproj
*** Building scheme "Few-iOS" in Few.xcworkspace
** BUILD FAILED **

The following build commands failed:
        CompileSwift normal x86_64 /Users/mark/projects/foo/Carthage/Checkouts/Few.swift/FewCore/Element.swift
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
/Users/mark/projects/foo/Carthage/Checkouts/Few.swift/FewCore/Element.swift:69:234: error: type 'Direction' has no member 'Row'
A shell task failed with exit code 65:
** BUILD FAILED **

The following build commands failed:
        CompileSwift normal x86_64 /Users/mark/projects/foo/Carthage/Checkouts/Few.swift/FewCore/Element.swift
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)

And here's the output when I build for Mac:

→ carthage update --platform Mac
*** Fetching Few.swift
*** Fetching SwiftBox
*** Checking out SwiftBox at "c316daebb98237a0c20c5fc7cb92028f44809861"
*** Checking out Few.swift at "12406946e2b11b3f0848235544ff6aaf97618f6b"
*** xcodebuild output can be found in /var/folders/s6/qx12s0856zg2zhsnx_14sqd40000gn/T/carthage-xcodebuild.lbVR1l.log
*** Building scheme "SwiftBox-Mac" in SwiftBox.xcodeproj
*** Building scheme "Few-Mac" in Few.xcworkspace
** BUILD FAILED **

The following build commands failed:
        CompileSwift normal x86_64 /Users/mark/projects/foo/Carthage/Checkouts/Few.swift/FewCore/Element.swift
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
/Users/mark/projects/foo/Carthage/Checkouts/Few.swift/FewCore/Element.swift:39:21: error: type of expression is ambiguous without more context
/Users/mark/projects/foo/Carthage/Checkouts/Few.swift/FewCore/Element.swift:69:234: error: type 'Direction' has no member 'Row'
A shell task failed with exit code 65:
** BUILD FAILED **

The following build commands failed:
        CompileSwift normal x86_64 /Users/mark/projects/foo/Carthage/Checkouts/Few.swift/FewCore/Element.swift
        CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)

FWIW In Carthage/Checkouts/SwiftBox/SwiftBox/Node.swift, I see this:

public enum Direction: UInt32 {
    case Inherit = 0
    case LeftToRight = 1
    case RightToLeft = 2
}

No idea if that's the enum it's looking at, but if it is it certainly doesn't have a Row member.

Is there some mismatch between Few.swift and Swiftbox going on? Some kind of Cartfile confusion or something? Admittedly, I have never used either of these libraries, so I'm exactly sure what I'm looking at. This library looks great - I've got a prototype build of a Redux Swift implementation and would love to hook it up with Few.swift.

Thoughts?

mwise commented 9 years ago

Looks like Few.swift should maybe be using the FlexDirection enum here instead of Direction? It looks like the FlexDirection enum was added in this commit: https://github.com/joshaber/SwiftBox/commit/d518d73ab6c5c64372f95079b67f3cfc2e31aab9

So hopefully this is just a matter of pointing Few.swift at the correct commit in Swiftbox?

joshaber commented 8 years ago

Sorry for the lack of response :disappointed:

I've got a prototype build of a Redux Swift implementation and would love to hook it up with Few.swift.

That sounds awesome! :metal:

I don't have a lot of time to look into this, but I'd welcome a PR that does the needful.

mwise commented 8 years ago

Right on, I know they keep you folks busy at GitHub. I was able to pin the various Carthage stuffs to where things installed via https://github.com/mwise/Few.swift/blob/swift-2.1/Cartfile.resolved. That's likely missing a bunch of new stuff, but at least it worked. I'll see if I can get a PR based off a later commit working.

Fwiw the Redux/Swift spike I'm working on is at https://github.com/mwise/Redux.swift. It's as alpha as it gets, and would probably be private if I'd known how to dev against private repos via Carthage and if somebody hadn't gone and starred it! My Few adapter for it is still private, but I'll let you know when it's available (it'll be like two files).

joshaber commented 8 years ago

Hopefully addressed by #100 :pray: