Subject: | resolution of recommended prereqs is incorrect, does not handle circularity |
This came up on #moose.
Moose has a test-requires prereq on Test::CleanNamespaces.
Test::CleanNamespaces has a test-recommends prereq on Moose.
The key point (IMO) is:
It's ok to default to recommends-on as long as it goes "oops, it a circular dependency, back up and don't install this recommendation after all." recommends-on does NOT mean automatically promote all recommendations to requires.
the full log:
09:19 < atta> haarg: also (I don't know if it has to do with Mouse), when I do a brand new install of perlbrew and perl (in this case, 5.20.1) and then try to install Moose with "cpan Moose" I can't get it because of an Test::CleanNamespace error
09:19 < atta> if I do the same perlbrew and perl install and try to install Moose with cpan minus (cpanm), then the installation goes nicely
09:20 < atta> have someone had this problem too?
09:22 < atta> it would be nice if someone could test it. "perlbrew install perl-5.20.1; perlbrew use perl-5.20.1; cpan Moose" . I can file a bug if someone confirms it
09:29 <@ether> atta "have someone had this problem too" --it would help if you nopasted the error
09:32 <@ether> please just paste your entire log. if you're seeing it on a clean install, that's good enough for me to call it an error with *something*. maybe it's an error with your particular setup, but it's clear there's a problem somewhere. don't discount your own experiences :)
09:42 < atta> ether: :) for sure I'm not discounting it. I will produce this log and then get back here. I'm at work, so maybe can't do it now, but will do 09:43 <@ether> ok, no worries, I'm at work too (and deep in a production outage presently) :)
09:58 < Dr^ZigMan> Firing up a new perlbrew, I'll see if I can replicate it. Nothing like a production outage to get the blood pumpin'
10:06 < Dr^ZigMan> Unable to replicate. cpan based install of Moose on fresh perl-5.20.1 succeeded without incident.
12:41 < atta> ether: http://pastebin.com/dvHyQDTG line 3997 says that Test::CleanNamespace has Moose as its dependency, and therefore won't be installed, but I was installing Moose in the first place. line 4521 confirms that Test::CleanNamespace is not installed. maybe I'm seeing something wrong. I'm downloading a debian and will run a virtual machine to make sure it's not something on my installation, but this happened in a mac of a collegue at work and in the de
12:41 < atta> with cpanm it doesn't happen. I hope this log helps :)
12:42 < atta> I had to crop the begining of the log because pastebin.com only allows for files until 512 K
12:42 <@mst> atta: it's marked optional
12:42 <@ether> sounds like something is installing recommended prereqs by default, and not resolving the resulting circular dependency correctly.
12:42 <@mst> but for some reason cpan's trying to install it anyway
12:43 <@ether> is cpan defaulting to recommends now?
12:43 <@ether> because that's retarded if it can't resolve the ensuing circularity.
12:43 < atta> let me check
12:43 * mst thinks having extra deps like that in build_recommends is icky anyway
12:43 <@mst> suggests *maybe*
12:43 <@ether> it's ok to default to recommends-on as long as it goes "oops, it a circular dependency, back up and don't install this recommendation after all."
12:44 <@ether> recommends-on does NOT mean automatically promote all recommendations to requires.
12:45 <@ether> I can re-release TCN without the Moose recommendation, but I will still maintain that the client resolving deps like this is wrong according to the meta spec.
12:46 <@mst> yes. but I think it should be pushed to suggests anyway
12:46 < atta> recommends_policy [1]
12:46 <@mst> because IMO it *isn't* a recommendation
12:46 <@ether> it's a test-recommends
12:46 <@mst> yeah, and I think that's incorrect
12:46 <@ether> it's reasonable given what the tests are doing.
12:46 <@ether> I already said I was willing to remove it given how cpan clients are resolving it
12:46 <@ether> but the cpan clients are still wrong :)
12:46 <@mst> I think suggests is reasonable, and recommends is incorrect
12:46 <@mst> and the cpan clients are still wrong too
12:47 <@ether> the same problem would then arise if the client was defaulting to installing suggests
12:47 <@mst> yes, hence and the cpan clients are still wrong too
12:47 <@ether> *nod*
12:47 <@mst> I can very well believe T::CN is doing it wrong while at the same time believing it should've worked
12:48 <@mst> that just resolves to 'mostly aggravated at everybody', which is my default state anyway ;)
12:49 <@ether> yes, well, I'm used to that one :)