Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

--dev does not pick latest dev version #308

Closed
ribasushi opened this Issue Aug 26, 2013 · 6 comments

Comments

Projects
None yet
3 participants
Owner

miyagawa commented Aug 26, 2013

This is because MetaCPAN API returns the score for these releases as the same value, 1.005.

      { 
        'fields' => {
          'release' => 'Test-Simple-1.005000_005',
          'module' => [
            { 
              'version_numified' => '1.00500000005',
              'authorized' => $VAR1->{'hits'}{'hits'}[0]{'fields'}{'module'}[0]{'authorized'},
              'indexed' => $VAR1->{'hits'}{'hits'}[0]{'fields'}{'module'}[0]{'authorized'},
              'version' => '1.005000_005',
              'name' => 'Test::More',
              'associated_pod' => 'MSCHWERN/Test-Simple-1.005000_005/lib/Test/More.pm'
            }
          ],
          'status' => 'cpan',
          'date' => '2012-04-26T22:28:07.000Z'
        },
        '_id' => 'uja43kGk2btJQ2q1DuKjanGxwSk',
        '_score' => '1.005',
        '_index' => 'cpan_v1',
        '_type' => 'file'
      },
Owner

miyagawa commented Aug 26, 2013

But it will then fallback to the date sort, which is apparently backwards.

@miyagawa miyagawa closed this in 1c763db Aug 26, 2013

Owner

miyagawa commented Aug 26, 2013

... and no, that was intentional because, for non-dev releases, first come first serve.

miyagawa added a commit that referenced this issue Aug 26, 2013

Revert "Compare date reverse chronologically, if the MetaCPAN score a…
…re the same. Fix #308"

For non-dev releases, first come wins.

This reverts commit 1c763db.

@miyagawa miyagawa reopened this Aug 26, 2013

Owner

miyagawa commented Aug 26, 2013

reported to MetaCPAN CPAN-API/cpan-api#284

@miyagawa miyagawa closed this in 3838d0d Aug 26, 2013

so now, for non-dev releases it's ordered chronologically, and for dev releases it's ordered reverse chronologically? (If so, that sounds correct to me!)

Owner

miyagawa commented Aug 26, 2013

Yep. 

Sent from Mailbox for iPhone

On Mon, Aug 26, 2013 at 8:36 AM, Karen Etheridge notifications@github.com
wrote:

so now, for non-dev releases it's ordered chronologically, and for dev releases it's ordered reverse chronologically? (If so, that sounds correct to me!)

Reply to this email directly or view it on GitHub:
#308 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment