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

Wrong links in search results #78

Closed yas375 closed 9 years ago

yas375 commented 9 years ago

Steps:

  1. Open cocoapods.org
  2. Enter 'confirmation' as a search query.
  3. You should see MRConfirmationAlertView in search results.
  4. Click on its name or on the Site link.

Expected: it opens https://github.com/mricketson/MRConfirmationAlertView (according to the spec) Result: it opens https://github.com/mattt/TransformerKit

2015-01-20_1914

P.S. I'm sorry if I choose wrong repository to open an issue in. Maybe it should be under cocoapods/cocoapods.org instead?

floere commented 9 years ago

No, it's fine as it's not clear if it's a search or cocoapods.org issue. I'm guessing it may be the JS in cp.org. @orta?

On Tue, Jan 20, 2015 at 5:23 PM, Victor Ilyukevich notifications@github.com wrote:

Steps:

  1. Open cocoapods.org
  2. Enter 'confirmation' as a search query.
  3. You should see MRConfirmationAlertView in search results.
  4. Click on its name or on the Site link. Expected: it opens https://github.com/mricketson/MRConfirmationAlertView (according to the spec) Result: it opens https://github.com/mattt/TransformerKit 2015-01-20_1914

P.S. I'm sorry if I choose wrong repository to open an issue in. Maybe it should be under cocoapods/cocoapods.org instead?

Reply to this email directly or view it on GitHub: https://github.com/CocoaPods/search.cocoapods.org/issues/78

orta commented 9 years ago

Interesting, will need to look in the db for this. The site is pretty dumb, it takes whatever from the results.

orta commented 9 years ago

Yep, looks like, the first version of the spec included that as the homepage: https://github.com/mricketson/MRConfirmationAlertView/blob/master/MRConfirmationAlertView.podspec

Later versions fixed this, but we must be grabbing that pod_version ( presumably you're doing a .first somewhere in search )

floere commented 9 years ago

Good job! :) I'll have to check how search gets the last version. It uses Gem::Version, but I could have implemented it wrong.

floere commented 9 years ago

The code appears to correctly use the right version. But I can't check for this pod. What is the latest version, what the one whose spec. Is used?

segiddins commented 9 years ago

@floere it should be using Pod::Version :)

orta commented 9 years ago

screen shot 2015-01-20 at 12 13 48

15618 has Mattt's link, it correlates to Podspec version 1.0.0. The rest don't have it.

floere commented 9 years ago

Version 15618? (No, the version id, I guess)

floere commented 9 years ago

@orta What is the name of version #15618?

orta commented 9 years ago

This one is weird actually!

orta commented 9 years ago

all 5 commits are associated with the same pod_version.

orta commented 9 years ago

these are the reasons why we discourage editing via PRs.

kylef commented 9 years ago

Btw: https://github.com/CocoaPods/Specs/commit/eac152fa1fdef4f305fc67cd2a6a89661f3ca16f, this change pre-dated the move to JSON specs. But it was broken, the migrator (from Ruby DSL to JSON specs in Trunk) must do the wrong with with multiple versions of the same spec.

floere commented 9 years ago

That means we're not using the right commit.

@orta What do you mean by "these"?

floere commented 9 years ago

Ok, got it. Thanks! @yas375 You've helped me find a tiny bug related to this issue.

orta commented 9 years ago

well, ideally we should have a 1 to 1 ratio of commit to version otherwise we don't really know which is the most valid one. In theory we'd need to do a order by created_by for a best guess.

floere commented 9 years ago

Fixed: http://cocoapods.org/?q=confirmation Cheers!

yas375 commented 9 years ago

Just a little more than an hour... You guys rock! :star2:

orta commented 9 years ago

( Also, @kylef that makes sense )

floere commented 9 years ago

@yas375 Thanks! I was on a bad phone connection, otherwise we may have done it in 20 minutes ;)

floere commented 9 years ago

Btw, the problem was that I had assumed generally a 1:1 correspondence, so a random commit was taken.

yas375 commented 9 years ago

@yas375 Thanks! I was on a bad phone connection, otherwise we may have done it in 20 minutes ;)

)))) :+1: