Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pinning non-lead modules with MetaCPAN resolver can fail comparison #684

Open
thibaultduponchelle opened this issue Dec 11, 2024 · 1 comment

Comments

@thibaultduponchelle
Copy link

thibaultduponchelle commented Dec 11, 2024

Hi @miyagawa 👋🏼

When using MetaCPAN resolver and pinning a module version which is not the "lead module" of the distribution, comparison to know if it satisfies can fail.

$ cpanm --metacpan Pod::Simple::[email protected] --force
Found Pod::Simple::HTMLLegacy 3.45 which doesn't satisfy == 5.01

$ cpanm Pod::Simple::[email protected] --force
...
1 distribution installed

Pod::Simple::HTMLLegacy is not the lead package.

But the distribution Pod::Simple version 3.45 contains well the package Pod::Simple::HTMLLegacy version 5.01 - fastapi

{
   "date" : "2023-05-15T23:28:35",
   "download_url" : "https://cpan.metacpan.org/authors/id/K/KH/KHW/Pod-Simple-3.45.tar.gz",
   "version" : "3.45",
   "release" : "Pod-Simple-3.45",
   "checksum_sha256" : "8483bb95cd3e4307d66def092a3779f843af772482bfdc024e3e00d0c4db0cfa",
   "status" : "latest",
   "checksum_md5" : "18b2176f025f8b2213d9c31946f75cb8"
}

See also MetaCPAN Pod-Simple-3.45

@thibaultduponchelle thibaultduponchelle changed the title Pinning non-lead modules with MetaCPAN is Pinning non-lead modules with MetaCPAN can fail comparison to know if it satisfies the requirement Dec 11, 2024
@thibaultduponchelle thibaultduponchelle changed the title Pinning non-lead modules with MetaCPAN can fail comparison to know if it satisfies the requirement Pinning non-lead modules with MetaCPAN can fail comparison Dec 11, 2024
@thibaultduponchelle thibaultduponchelle changed the title Pinning non-lead modules with MetaCPAN can fail comparison Pinning non-lead modules with MetaCPAN resolver can fail comparison Dec 11, 2024
@miyagawa
Copy link
Owner

This is likely an issue with metacpan API not returning the version of the specified package, and cpanm is assuming the distribution version to be the same.

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

No branches or pull requests

2 participants