Froi
Froi

Reputation: 39

Pod spec dependency

I'm creating a private pod, that is using SwiftState pod. For this library, I'm using the Swift3 branch:

pod 'SwiftState', :git=> 'https://github.com/ReactKit/SwiftState.git', :branch => 'swift/3.0'

Project compiles, but when I add this pod as a dependency:

s.dependency 'SwiftState'

And then, perform the pod repo push, I've got the same errors when I was using the Swift 2.3 branch in my project, before I noticed that master branch was not update with Swift 3 version:

ERROR | [iOS] xcodebuild: Returned an unsuccessful exit code. You can use `--verbose` for more information.
    - ERROR | xcodebuild:  SwiftState/Sources/EventType.swift:17:5: error: expected identifier in enum 'case' declaration
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:31:38: error: function types cannot have argument label 'event'; use '_' instead
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:31:49: error: function types cannot have argument label 'fromState'; use '_' instead
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:31:63: error: function types cannot have argument label 'userInfo'; use '_' instead
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:74:13: error: expected 'let' in conditional
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:146:17: error: expected ',' joining parts of a multi-clause condition
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:381:17: error: expected ',' joining parts of a multi-clause condition
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:555:87: error: 'inout' before a parameter name is not allowed, place it before the parameter type instead
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:569:87: error: 'inout' before a parameter name is not allowed, place it before the parameter type instead
    - ERROR | xcodebuild:  SwiftState/Sources/StateMachine.swift:19:43: error: function types cannot have argument label 'fromState'; use '_' instead
    - ERROR | xcodebuild:  SwiftState/Sources/StateMachine.swift:19:57: error: function types cannot have argument label 'userInfo'; use '_' instead
    - ERROR | xcodebuild:  SwiftState/Sources/StateMachine.swift:53:13: error: expected 'let' in conditional
    - ERROR | xcodebuild:  SwiftState/Sources/StateMachine.swift:493:17: error: expected ',' joining parts of a multi-clause condition
    - ERROR | xcodebuild:  SwiftState/Sources/StateType.swift:17:5: error: expected identifier in enum 'case' declaration
    - ERROR | xcodebuild:  SwiftState/Sources/Machine.swift:27:32: error: single argument function types require parentheses
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/_HandlerInfo.swift:19:24: error: assigning non-escaping parameter 'handler' to an @escaping closure
    - NOTE  | [iOS] xcodebuild:  SwiftState/Sources/_HandlerInfo.swift:15:53: note: parameter 'handler' is implicitly non-escaping
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Disposable.swift:38:23: error: assigning non-escaping parameter 'action' to an @escaping closure
    - NOTE  | [iOS] xcodebuild:  SwiftState/Sources/Disposable.swift:37:17: note: parameter 'action' is implicitly non-escaping
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/EventType.swift:26:19: error: enum case 'Any' not found in type 'Event<E>'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/EventType.swift:39:21: error: type 'Event<_>' has no member 'Any'
    - NOTE  | xcodebuild:  SwiftState/Sources/EventType.swift:17:10: note: did you mean 'Any#'?
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/EventType.swift:57:16: error: enum case 'Any' not found in type 'Event<E>'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/EventType.swift:69:11: error: enum case 'Any' not found in type 'Event<E>'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/EventType.swift:79:11: error: enum case 'Any' not found in type 'Event<E>'
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:71:26: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:84:26: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:89:29: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:103:34: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:142:41: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:215:37: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:233:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:238:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:244:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:249:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:259:29: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:290:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:295:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:301:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:306:27: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:414:28: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:419:28: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:433:30: warning: extraneous duplicate parameter name; 'event' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:456:33: warning: extraneous duplicate parameter name; 'order' already has an argument label
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:503:20: warning: operator should no longer be declared with body; use a precedence group instead
    - WARN  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:540:47: warning: extraneous duplicate parameter name; 'fromState' already has an argument label
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:24:34: error: single argument function types require parentheses
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:49:41: error: single argument function types require parentheses
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:56:36: error: single argument function types require parentheses
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:95:86: error: 'Some' has been renamed to 'some'
    - NOTE  | [iOS] xcodebuild:  Swift.Optional<Wrapped>:5:24: note: 'Some' has been explicitly marked unavailable here
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:113:51: error: binary operator '==' cannot be applied to operands of type 'Event<E>' and '_'
    - NOTE  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:113:51: note: overloads for '==' exist with these partially matching parameter lists: (Event<E>, Event<E>), (Event<E>, E), (T, T), (Self, Self)
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:130:45: error: missing argument label 'condition:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:145:46: error: extraneous argument labels 'event:fromState:userInfo:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:163:77: error: ambiguous subscript with base type '[Event<E> : [Transition<S> : [String : (event: E?, fromState: S, toState: S, userInfo: Any?) -> Bool?]]]' and index type '_'
    - NOTE  | xcodebuild:  Swift.Dictionary:261:12: note: found this candidate
    - NOTE  | xcodebuild:  Swift.Dictionary:306:12: note: found this candidate
    - NOTE  | xcodebuild:  Swift.Collection:25:12: note: found this candidate
    - NOTE  | xcodebuild:  Swift.Indexable:23:12: note: found this candidate
    - NOTE  | xcodebuild:  Swift.Indexable:45:12: note: found this candidate
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:190:42: error: missing argument label 'event:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:217:79: error: ambiguous subscript with base type '[Event<E> : [_HandlerInfo<S, E>]]' and index type '_'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:259:54: error: type 'Event<E>' has no member 'Any'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:284:32: error: missing argument label '_routeID:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:363:36: error: assigning non-escaping parameter 'routeMapping' to an @escaping closure
    - NOTE  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:359:33: note: parameter 'routeMapping' is implicitly non-escaping
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:368:39: error: missing argument label 'routeMappingID:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:376:52: error: missing argument label 'routeMapping:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:378:58: error: type 'Event<_>' has no member 'Any'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:427:58: error: binary operator '==' cannot be applied to operands of type 'Event<E>' and '_'
    - NOTE  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:427:58: note: overloads for '==' exist with these partially matching parameter lists: (Event<E>, Event<E>), (Event<E>, E), (T, T), (Self, Self)
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:447:49: error: cannot convert value of type 'Event<E>' to expected argument type 'Event<_>?'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:466:34: error: missing argument label 'handlerID:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:507:22: error: missing argument label 'event:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:513:21: error: missing argument label 'event:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:535:54: error: missing argument label 'upperBound:' in call
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:543:19: error: cannot convert value of type 'Transition<S>' to expected element type 'Transition<_>'
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:380:42: error: closure use of non-escaping parameter 'routeMapping' may allow it to escape
    - NOTE  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:374:33: note: parameter 'routeMapping' is implicitly non-escaping
    - ERROR | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:386:13: error: closure use of non-escaping parameter 'handler' may allow it to escape
    - NOTE  | [iOS] xcodebuild:  SwiftState/Sources/Machine.swift:374:98: note: parameter 'handler' is implicitly non-escaping

So it seems that pod spec file is not getting the pod file information correctly, regarding the repo and the branch.

Am I missing something?

Many thanks.

Upvotes: 1

Views: 1053

Answers (2)

Hai Feng Kao
Hai Feng Kao

Reputation: 5288

Cocoapods doesn't allow users to specify a branch with s.dependency syntax.

The solutions:

  • Ask the author to officially release the swift/3.0 branch
  • Or you can put the following line in the Podfile wherever the private pod is used pod 'SwiftState', :git=> 'https://github.com/ReactKit/SwiftState.git', :branch => 'swift/3.0'

Upvotes: 1

Vladyslav Zavalykhatko
Vladyslav Zavalykhatko

Reputation: 17364

Podfile isn't used with your pod-generation, as I know; and, as it is said in this branch,

No, non-released dependencies can only be set in the Podfile.

Upvotes: 0

Related Questions