Pinto icon indicating copy to clipboard operation
Pinto copied to clipboard

If cpanm tries to install B when installing A, then shouldn't Pinto pull B when pulling A?

Open akarelas opened this issue 12 years ago • 6 comments

The module that made me ask this question is: https://metacpan.org/pod/Package::Stash

When I pull it, it doesn't pull Package::Stash::XS.

When I pinto install it, it tries to install Package::Stash::XS, however, and fails.

Package::Stash::XS is mentioned in the META.json file: https://metacpan.org/source/DOY/Package-Stash-0.36/META.json , so it's not missing.

akarelas avatar Mar 09 '14 13:03 akarelas

Maybe it's the module's maintainer's fault. If that's the case, please tell me and I'll notify him to fix it.

akarelas avatar Mar 09 '14 13:03 akarelas

In this particular case, Package::Stash::XS is listed only as a "recommended" prereq. Pinto only fetches the "required" prereqs (for configure, build, test, and run phases). As you have probably already figured out, the workaround is to pull Package::Stash::XS directly.

Perhaps Pinto should fetch recommended (or suggested) modules too. But Package::Stash::XS only makes sense iff you have C compiler, which Pinto doesn't know. So there's no way to get this right all the time, since authors can compute dependencies dynamically.

But you could also argue that it doesn't matter than much. If Pinto has certain distributions but cpanm never installs them (because you don't have the necessary tools) then it's not the end of the world. It just clutters up your repo.

What do you think would be the best approach?

thaljef avatar Mar 11 '14 06:03 thaljef

Maybe it's the module's maintainer's fault

No, not their fault.

thaljef avatar Mar 11 '14 06:03 thaljef

I'd be happy to see pinto err on the side of pulling in recommended stuff, even if it never gets used. Having them hanging around unused shouldn't be a problem but having them not at hand when cpanm reaches for them leads to sadness.

hartzell avatar Mar 12 '14 04:03 hartzell

Behaviour towards recommended modules could be an option in pinto pull, I guess.

akarelas avatar Mar 12 '14 19:03 akarelas

I would also like to see an option to pull recommended modules automatically. It can be a lot of work to find out which modules to pull manually (try installing Dist::Zilla for example ;-)

perlpunk avatar Jun 11 '14 14:06 perlpunk