GithubHelp home page GithubHelp logo

pod-weaver-section-extends's People

Contributors

friedo avatar mjgardner avatar mokko avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

mokko mjgardner

pod-weaver-section-extends's Issues

It's me again

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:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.