CocoaPods / search.cocoapods.org

This is the CocoaPods search engine repo, please direct CocoaPods issues to the main CocoaPods repository.
25 stars 11 forks source link

Show latest stable version instead of pre-release versions #102

Closed f2prateek closed 8 years ago

f2prateek commented 8 years ago

I have a pod with alpha releases (2.9.0-alpha), and I've made a stable release (1.0.0). The website shows 2.9.0-alpha as the latest release, instead of 1.0.0, which is what CocoaDocs and the normal dependency resolution point to.

Ref: https://github.com/CocoaPods/Specs/pull/13644#issuecomment-158203106

cc @floere

orta commented 8 years ago

Offhand:

This is not quite as simple as adding a pre-release check in the resolver, there will need to be work done in CocoaDocs to only ship CocoaPods metrics for stable release builds. It's currently assuming that the latest release is what we'll be showing in CocoaPods.org - then we need to re-generate the README/CHANGELOGs for every pod.

We'd also need a place to indicate that there are pre-release builds available in the pod page, as using something like ReactiveCocoa for which the latest build won't work unless you're using an old Xcode.

This is a non-trivial amount of work + time ( the last full CocoaDocs run took 2 weeks ) so this needs to be very certain before we make changes.

floere commented 8 years ago

@f2prateek Thanks for entering it here! We're currently in deliberations whether search (and the website etc., what @orta is referring to) should be changed to prefer the latest stable version over the latest version.

f2prateek commented 8 years ago

Thanks! For my own reference in the future — what's the best way to do have pre-release versions with the CocoaPods infrastructure currently? I might have a library 1.1.2 and want to do a pre-release version for 1.2.0 — if I tag it as 1.2.0-alpha (or beta or RC), it would show up as the latest version on the CocoaPods site which isn't ideal.

floere commented 8 years ago

@f2prateek That's the way to do it (to follow semver). Yes, it would show up as such – in the specific described case, I do understand less why it's not ideal. I do understand it better in the 2.9.0-beta + 1.0.0 case.

floere commented 8 years ago

@f2prateek In roughly 2 days the 1.0.0 result will be shown on cocoapods.org – see the blog post here: http://blog.cocoapods.org/Release-Versions-Only/

floere commented 8 years ago
f2prateek commented 8 years ago

@floere Awesome :shipit:

floere commented 8 years ago

Switch: flipped :rocket:

phatblat commented 8 years ago

Completely agree with the direction here but have a question: now that only released versions are showing up in the search how does one search for prerelease versions?

My current use case, I'm trying to search for Kal which has only one prerelease version which shows up in the pod search output.

-> Kal (1.0rc1)
   A calendar component for the iPhone (the UI is designed to match MobileCal).
   pod 'Kal', '~> 1.0rc1'
   - Homepage: http://www.thepolypeptides.com
   - Source:   https://github.com/klazuka/Kal.git
   - Versions: 1.0rc1 [master repo]

However, it doesn't appear through the website search or in the results from the API: http://search.cocoapods.org/api/v1/pods.flat.hash.json?query=name:Kal

floere commented 8 years ago

@phatblat We do not cover that case anymore. In the eyes of search, unreleased pods do not exist. Pod authors need to promote unreleased pods via other means.

phatblat commented 8 years ago

Gotcha. Then I guess this would actually be an issue with the CLI since it is showing up there.

floere commented 8 years ago

@phatblat Not necessarily – we can live with a little inconsistency in the two approaches.