friedo / pod-weaver-section-extends Goto Github PK
View Code? Open in Web Editor NEWPod::Weaver plugin for @ISA
Pod::Weaver plugin for @ISA
Hi Friedo,
i looked more into this and also found some nicer code to do what we're are doing here. I will suggest a PR soon. (You can already see what I mean here, if you're interested:
https://github.com/mokko/pod-weaver-section-consumes/tree/avoid_use_lib).
Anyways, because we load all classes of our project (at runtime), we run into trouble with dzil listdeps
when not all required modules are installed (which defeats the purpose of listdeps; the whole thing is the typical chicken-egg problem during installations). Although I don't understand quite why dzil listdeps
a) executes our podweaver plugin at all and b) why there is no way for our plugin to opt out during listdeps that means that all our classes/packages get loaded during listdeps and that in turn makes it likely that listdeps fails with ugly messages when not all modules are installed.
If you're using perlbrew etc., try with a biggish project that has lots of dependencies (like Dancer2) and a new perl (without any modules installed) and you'll see what I mean.
I am assuming that this is a typical worklow (with authordeps and listdeps) for installation on a fresh environment where Dist::Zilla and cpanm (and their dependencies) are already installed:
$dzil authordeps --missing | cpanm --no-skip-satisfied
$dzil listdeps --author --missing | cpanm --no-skip-satisfied
$dzil test --author --release
(not sure what --no-skip-satisfied does if anything at all. I found that in our .travis.yml and didn't change it.)
I don't think that there is an easy way out, at least not with current Dist::Zilla.
I think we should add a Caveat section with workarounds. I was able to think of two workarounds. Now I install missing modules in the authordeps phase, to ensure that listdeps works as expected. But this means I have to require certain modules twice in dist.ini and I am not sure prereqs in META.json etc. are still correct. (Didn't check yet.) And also that is more difficult to maintain than before.
Some other ideas/avenues:
PS: I started to talk to Dist::Zilla people on irc. They are MOST helpful.
PS: As far as I am aware, there is no PPI way which would allow us to read ISA and consumed roles without actually loading the classes. (That's who listdeps determines prereqs).
PPS: If error dzil error messages during
$dzil listdeps --author --missing | cpanm --no-skip-satisfied
would go to STDERR, I think cpanm's input pipe should not be effected by it, right? So perhaps that's an easy improvement. Yes?
PS:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.