This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics
Id:
115340
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
2.16



Subject: Too dumb in handling recursive dependencies
Test::More depends on File::Spec. File::Spec depends on Test::More. So I get things like this (running 2.10 on perl 5.8.7):
Show quoted text
cpan> test Test::More File::Spec
...
Show quoted text
cpan> install Test::More
Recursive dependency detected: Test::More (have: 0.54; want: 1.302026) => EXODIST/Test-Simple-1.302026.tar.gz => File::Spec (have: 3.05; requires: 0) => RJBS/PathTools-3.62.tar.gz => Test::More (have: 0.54; requires: 0.88). Cannot resolve. Karen Etheridge points out in https://github.com/Test-More/test-more/issues/682 that, since File::Spec is already installed and the required version (0) is lower than the installed version, it should not consider this a circular dependency. Personally, I don’t think it’s worth making CPAN.pm more complicated, and I suggested simply dropping the prerequisite declarations from Test::More (it’s sufficiently low-level that that should never be a problem), but I wanted to see what opinions were on the ‘other side’.
On Tue Jun 14 21:04:08 2016, SPROUT wrote:
Show quoted text
> Test::More depends on File::Spec. File::Spec depends on Test::More. > So I get things like this (running 2.10 on perl 5.8.7): >
> cpan> test Test::More File::Spec
> ...
> cpan> install Test::More
> > Recursive dependency detected: > Test::More (have: 0.54; want: 1.302026) > => EXODIST/Test-Simple-1.302026.tar.gz > => File::Spec (have: 3.05; requires: 0) > => RJBS/PathTools-3.62.tar.gz > => Test::More (have: 0.54; requires: 0.88). > Cannot resolve. > > Karen Etheridge points out in https://github.com/Test-More/test- > more/issues/682 that, since File::Spec is already installed and the > required version (0) is lower than the installed version, it should > not consider this a circular dependency. > > Personally, I don’t think it’s worth making CPAN.pm more complicated, > and I suggested simply dropping the prerequisite declarations from > Test::More (it’s sufficiently low-level that that should never be a > problem), but I wanted to see what opinions were on the ‘other side’.
That said, if a dependency is recursive, why cannot both modules just get installed at the same time and included in each other’s PERL5LIB when testing? (If they are build or configure prerequisites, then CPAN.pm could continue to freak out.)
I think this should be fixable just by acknowledging that the dependencies are on different version numbers instead of throwing them into one basket with the highest dependency dominating. The reason it is so picky is that the circular dependency detection happens in the planning phase. Changing that seems like more effort than the strategy I describe above.
Tentative fix in a6879ac.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.