Skip Menu |

This queue is for tickets about the Math-Random-ISAAC-XS CPAN distribution.

Report information
The Basics
Id: 85959
Status: open
Priority: 0/
Queue: Math-Random-ISAAC-XS

People
Owner: Nobody in particular
Requestors: dagolden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Math::Random::ISAAC dependency still showing recommended, not required
It would be nice to just require M::R::I::XS and get M::R::I installed, too. :-)
Hey David, On Fri Jun 07 17:22:12 2013, DAGOLDEN wrote: Show quoted text
> It would be nice to just require M::R::I::XS and get M::R::I > installed, too. :-)
The XS module is meant to be used independently of the Pure Perl implementation; that's why it just recommends Math::Random::ISAAC. I imagine other modules should (in theory) be requiring M::R::I and only recommending M::R::I::XS, right? (Otherwise you're explicitly precluding systems that don't have a compiler, for example)
Subject: Re: [rt.cpan.org #85959] Math::Random::ISAAC dependency still showing recommended, not required
Date: Fri, 7 Jun 2013 20:43:06 -0400
To: bug-Math-Random-ISAAC-XS [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
On Fri, Jun 7, 2013 at 8:07 PM, Jonathan Yu via RT <bug-Math-Random-ISAAC-XS@rt.cpan.org> wrote: Show quoted text
> I imagine other modules should (in theory) be requiring M::R::I and only recommending M::R::I::XS, right? (Otherwise you're explicitly precluding systems that don't have a compiler, for example)
Assuming you want people to use M::R::I->new and get either XS/PP, then I would think that M::R::I::XS should require M::R::I. Other modules can require M::R::I and recommend M::R::I::XS as you say. OTOH, if the goal is to mandate XS, then it should be enough to require it and get M::R::I along with it instead of having to require them both. But since M::R::I::XS can be used independently of M::R::I, I can see why you would let it stand alone. I suppose I can just code around this peculiar way of doing the dependency if you really want it that way. David -- David Golden <dagolden@cpan.org> Take back your inbox! → http://www.bunchmail.com/ Twitter/IRC: @xdg
David, I just want to understand your use case some more... I imagine your library should just require Math::Random::ISAAC and use that interface. Math::Random::ISAAC::XS should be considered recommended. If it happens to be available, then your code will be automagically accelerated. On Fri Jun 07 20:43:53 2013, DAGOLDEN wrote: Show quoted text
> I suppose I can just code around this peculiar way of doing the > dependency if you really want it that way.
Is this really that peculiar? What do other modules with Perl + XS implementations do in this regard? Do you have some other examples I could look at? I'm not opposed to this change, but I want to understand exactly why it is necessary, given that it would require some additional dependencies (I can imagine that there might be use cases where you want to depend on the XS version and use that directly, and don't care to have the Pure Perl implementation installed). Cheers, Jonathan
Subject: Re: [rt.cpan.org #85959] Math::Random::ISAAC dependency still showing recommended, not required
Date: Mon, 10 Jun 2013 22:04:42 -0400
To: bug-Math-Random-ISAAC-XS [...] rt.cpan.org
From: David Golden <dagolden [...] cpan.org>
Show quoted text
> Is this really that peculiar? What do other modules with Perl + XS implementations do in this regard? Do you have some other examples I could look at?
TIMTOWTDI, of course. :-) Generally, what I see is a 'front-end' module that includes the PP 'backend' and that will transparently use the XS 'backend' if installed. (As Math::Random::ISAAC does.) The question is really what requires/recommends what? E.g. * Class::Load::XS -- requires Class::Load; Class::Load recommends nothing * Package::Stash::XS -- requires nothing (and recommends nothing), but Package::Stash recommends Package::Stash::XS In the Class::Load::XS case, it requires Class::Load because it expects you to use that as the front-end. The back-end is useless without it. In the Package::Stash::XS case, it still expects you to use Package::Stash as the front-end, but doesn't list it as a dependency. (You're expected to do that yourself.) Instead, Package::Stash recommends the XS version. Why one approach vs the other? To me, the advantage of the Class::Load::XS requiring the front-end is that it avoids having to specify both as a prerequisite if you really insist on needing the XS version. On the other hand, if you're using recommends then it makes more sense to have the front-end recommend a faster backend, but leave the back-end requiring/recommending nothing (to avoid circular dependencies). [aside: there's been discussion of a need for a "soft recommends" that wouldn't imply circularity, but no one has implemented that yet in the toolchain.] What Math::Random::ISAAC and ::XS appear to be doing is each recommending the other, which is weird and circular. On reflection, I would suggest adopting the Package::Stash/XS approach. Your front-end should recommend the faster back end. Since Math::Random::ISAAC::XS can work completely stand-alone, it doesn't actually require Math::Random::ISAAC and should neither recommend it or require it. (It should be listed in SEE ALSO, of course.) So I'm changing my ticket request -- please just drop the recommends. :-) I suspect my CPAN client was getting confused by the circularity and I initially misunderstood what was going on. Regards, David -- David Golden <dagolden@cpan.org> Take back your inbox! → http://www.bunchmail.com/ Twitter/IRC: @xdg