Skip to content

Get all CPAN distributions using scroll API for MetaCPAN#2817

Open
zmughal wants to merge 2 commits into
librariesio:mainfrom
zmughal:metacpan-scroll-dists
Open

Get all CPAN distributions using scroll API for MetaCPAN#2817
zmughal wants to merge 2 commits into
librariesio:mainfrom
zmughal:metacpan-scroll-dists

Conversation

@zmughal

@zmughal zmughal commented May 18, 2021

Copy link
Copy Markdown
  • Get all CPAN distributions using scroll API for MetaCPAN
  • Revert "Remove CPAN from missing task"

Fixes #1961.

irb(main)> PackageManager::CPAN.project_names.size
=> 37945

which is roughly what we get from

$ curl -s 'https://fastapi.metacpan.org/v1/release/_search?q=status:latest'  | jq '.hits.total'
37972

Of note, searching for distributions directly gets:

$ curl -s 'https://fastapi.metacpan.org/v1/distribution/_search'  | jq '.hits.total'
42548

I'm not yet sure about why there is a discrepancy.

@zmughal

zmughal commented May 19, 2021

Copy link
Copy Markdown
Author

I think I could shorten the code a little bit by using a ternary operator inside the loop. Let me know which approach you prefer!

@zmughal

zmughal commented May 28, 2021

Copy link
Copy Markdown
Author

@tiegz , @jsonperl, any thoughts? I believe I’ll need to rebase this now.

If this isn’t the right place or the right issue to tackle, let me know.

@zmughal zmughal force-pushed the metacpan-scroll-dists branch from 106cda7 to aece71c Compare May 30, 2021 16:24
@zmughal

zmughal commented May 30, 2021

Copy link
Copy Markdown
Author

Fixed the merge conflict.

@zmughal

zmughal commented Jun 25, 2021

Copy link
Copy Markdown
Author

Hello! What can I do to get this merged or, if needed, implement similar functionality in another repository?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Getting list of all CPAN package names is broken

1 participant