What's the most sane approach to circular dist dependencies when using things like Module::Install 'features'?
I just moved Handel to use M::I last night, and added H::Storage::RDBO as an optional feature. Of course, the H::Storage::RDBO dist has Handel a a prereq. Now I have a nice lovely circular dependency.
What's the common practice on dealing with this issue? Do I just remove Handel from the prereqs listead in H::S::RDBOs Makefile? ...and make all tests skip, or die? How will automated testers know what to do, or how do you cope with all of the failing reports when servers just try testing H::S::RDBO on their own?
Can't say that I've ever had to tackle this before. :-/
Re:No circular deps, honest.
jk2addict on 2007-07-25T17:15:53
To me, this is really a toolchain failure.
If something is an 'optional feature', it needs to be treated like 'install this afterwords' rather than 'this is a prereq'...because, it isn't a prereq.Re:No circular deps, honest.
Aristotle on 2007-07-25T19:46:44
It is a toolchain issue alright, but installing “optional feature” modules afterwards would be a mistake, because then the tests for them would never get run. Rather, what you want is for the toolchain to be able to figure out that when distro A recommends distro B and distro B depends on distro A, then distro B can be installed afterwards. Whereas if distro A recommends distro B but distro B does not depend – directly or indirectly – depend on distro A, then distro B needs to be installed first.
Re:No circular deps, honest.
jk2addict on 2007-07-25T19:55:53
"modules afterwards would be a mistake, because then the tests for them would never get run"
I'm not sure that's always true either. The tests for the optional additional 'features' are in that features dists, not the original dist. NO reason they won't be run.
Definitely seems like a disconnect on some level. Maybe if the code wasn't actually named 'feature' I wouldn't care so much.:-) Re:No circular deps, honest.
Aristotle on 2007-07-25T22:57:51
No, that’s not what I meant. If distro A has an optional feature that requires distro B, then installing B after A means that A’s tests for the optional feature will never be run.
The trick is to detect the circular dependency and take the appropriate action.
In CPANPLUS' case, we add the path to one module's extract dir to @INC, then build & install the other, reset @INC, then build the first.
* Where 'non-issue' holds true if at least 1 of the 2 dependencies is pure perl