nerdishbynature / octokit.swift

A Swift API Client for GitHub and GitHub Enterprise
MIT License
490 stars 126 forks source link

Remove NBNRequestKit version from podspec #49

Closed 1ec5 closed 7 years ago

1ec5 commented 7 years ago

In order for a project to use this Swift 2.3 branch, it also needs to use RequestKit’s Swift 2.3 branch by overriding the NBNRequestKit entry in the Podfile:

pod 'NBNRequestKit', :git => 'https://github.com/nerdishbynature/RequestKit.git', :branch => 'swift-2.3'

This PR removes the version requirement from the NBNRequestKit dependency, resolving the conflict that arises when the Podfile specifies an external source for NBNRequestKit:

[!] Unable to satisfy the following requirements:

- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (~> 0.3.0)` required by `OctoKit.swift (0.6.1)`

/ref #45 /cc @pietbrauer

pietbrauer commented 7 years ago

Isn't this a CocoaPods bug then?

1ec5 commented 7 years ago

I don’t think it is. As far as I can tell, the ~> 0.3.0 in the podspec means an official source distributed through CocoaPods.org is required. But the Swift 2.3 branch requires an external source instead, so the ~> 0.3.0 is misleading and conflicts with the Git/branch requirement in the podfile.

pietbrauer commented 7 years ago

Shouldn't your Podfile look like this then?

pod 'OctoKit', :git => 'https://github.com/nerdishbynature/OctoKit.swift.git', :branch => 'swift-2.3'
pod 'NBNRequestKit', :git => 'https://github.com/nerdishbynature/RequestKit.git', :branch => 'swift-2.3'
1ec5 commented 7 years ago

It doesn’t matter what order the dependencies are listed in the podfile. The podfile and OctoKit.swift podspec will conflict anyways:

Pre-downloading: `NBNRequestKit` from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`
Pre-downloading: `OctoKit.swift` from `https://github.com/nerdishbynature/octokit.swift.git`, branch `swift-2.3`
[!] Unable to satisfy the following requirements:

- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (~> 0.3.0)` required by `OctoKit.swift (0.6.1)`

Specs satisfying the `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`), NBNRequestKit (~> 0.3.0)` dependency were found, but they required a higher minimum deployment target.

(The bit about the higher minimum deployment target does appear to be a bug in CocoaPods. I’m seeing this in a project that has the minimum iOS deployment target set to iOS 8.0, which matches RequestKit’s Swift 2.3 branch.)

friedbunny commented 7 years ago

This is still problematic. Using octokit.swift’s swift-2.3 branch installs NBNRequestKit 0.3.0, which is not compatible.

Manually specifying NBNRequestKit :branch => 'swift-2.3' in the Podfile results in the same error as above:

Pre-downloading: `OctoKit.swift` from `https://github.com/nerdishbynature/octokit.swift.git`, branch `swift-2.3`
[!] Unable to satisfy the following requirements:

- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (from `https://github.com/nerdishbynature/RequestKit.git`, branch `swift-2.3`)` required by `Podfile`
- `NBNRequestKit (~> 0.3.0)` required by `OctoKit.swift (0.6.1)`
pietbrauer commented 7 years ago

Hey, sorry for the delay, hectic times. I still think this is a cocoa pods bug and opened an issue: https://github.com/CocoaPods/CocoaPods/issues/5912

pietbrauer commented 7 years ago

I will release Swift 2.3 and Swift 3.0 releases today.

pietbrauer commented 7 years ago

Seems like this was the fix we needed https://github.com/nerdishbynature/octokit.swift/pull/45/commits/2569857dd186f027c428e75cca7940e3d9544121

friedbunny commented 7 years ago

Thanks @pietbrauer, Swift 2.3 support is 💯.