Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'd love to be writing a post called Why I love Dist::Zilla. Maintaining CPAN-style modules has a fair amount of boiler-plate and boring paper-work that must be maintained and fiddled with--it's especially annoying when you make a new module, but every release cycle has its annoyances. Dist::Zilla is intended to help reduce these issues.

Granted, I had my doubts about Dist::Zilla going in. I am concerned that it is another powerful, flexible, tool, that will require many hours to really understand and use effectively. Perhaps Dist::Zilla is only a reasonable trade of the the most prolific of CPAN authors. It also has a pretty good sized list of dependencies. We all know all the arguments around dependencies and whether they are a good or bad thing, so I won't rehash them here.

So, I love the idea of Dist::Zilla, and I decided give it a whirl. The thing is, I have made two different efforts to install Dist::Zilla and blown several hours each time without getting a usable install. It's really not working out to be a good time trade-off. Frankly, this is not the trouble I was expecting. I was worried about learning curve, not installation. In my previous experience, using modules from top CPAN contributors has not been a problem. Let CPAN.pm hunt down prereqs and BOOOM!-working distro.

Dzil is the latest latest thing in Perl, it uses Moose (which I really dig) and a bunch of MooseX modules in innovative ways to produce really clean, maintainable looking code that I can't install. The first time I tried to use it I gave up while trying to install MooseX::Types. It's been a long time, I don't remember all the related versions and everything. I decided to give it another go.

This time, I spent a lot of time diving through big long blobs of TAP output to find modulues that broke and look for dependencies that might not be properly reported.

So far, trying to install Dist::Zilla 4.200006 with Moose 2.0002 (already installed) has been painful, I spent quite a while fetching and building a big pile of prerequisites. That done, I started getting test failures.

I've had to install several modules manually after grubbing in TAP output and module source. Each one gets me a bit closer.

I can't recall everything that I've had to do, (my 10,000 line scrollback buffer overflowed). But I know I had and tracked down these issues:

  • MooseX::OneArgNew -> failed due to me having namespace::autoclean 0.11 instead of namespace::autoclean 0.12 installed. This was easy to track down since it was called out in a clear message:
    t/basic.t ............... Couldn't load class (MooseX::OneArgNew) beca +use: Undefined subroutine &namespace::autoclean::on_scope_end called +at /Users/toad/perl5/lib/perl5/namespace/autoclean.pm line 57. BEGIN failed--compilation aborted at /Users/toad/.cpan/build/MooseX-On +eArgNew-0.001-mHVvqm/blib/lib/MooseX/OneArgNew.pm line 11. Compilation failed in require at /Users/toad/perl5/lib/perl5/darwin-th +read-multi-2level/Class/MOP.pm line 117. at /Users/toad/perl5/lib/perl5/darwin-thread-multi-2level/Class/MOP.p +m line 123 Class::MOP::__ANON__('Undefined subroutine &namespace::autoclean:: +on_scope_end call...') called at /Users/toad/perl5/lib/perl5/Try/Tiny +.pm line 100
  • Role::HasMessage -> installed properly after I updated namespace::autoclean.
  • As did Config::MVP
  • This got me to Dist::Zilla::MVP::RootSection failing the compile.t:
    # Failed test 'require Dist::Zilla::MVP::RootSection;' # at t/compile.t line 17. # Tried to require 'Dist::Zilla::MVP::RootSection'. # Error: Could not create the 'reader' method for zilla because : + The method '_inline_store' was not found in the inheritance hierarch +y for Moose::Meta::Class::__ANON__::SERIAL::10 at /Users/toad/perl5/l +ib/perl5/darwin-thread-multi-2level/Class/MOP/Class.pm line 1034 # Class::MOP::Class::__ANON__('Moose::Meta::Class=HASH(0x1022490b8 +)', '_inline_store') called at /Users/toad/perl5/lib/perl5/darwin-thr +ead-multi-2level/Class/MOP/Class.pm line 1079 # Class::MOP::Class::add_around_method_modifier('Moose::Meta::Clas +s=HASH(0x1022490b8)', '_inline_store', 'CODE(0x1022387d8)') called at + /Users/toad/perl5/lib/perl5/darwin-thread-multi-2level/Moose/Meta/Ro +le/Application/ToClass.pm line 222 .... AND MUCH MUCH MORE ...
  • Looking at the source of Dist::Zilla::MVP::RootSection, I saw, MooseX::LazyRequire listed in a use line, so I tried to install it. (it was not installed). Still Dist::Zilla won't build.

Later on I'll keep looking and trying to install Dist::Zilla.

So, Dist::Zilla has been an entirely negative experience. Not all of it is due to errors on the part of DZ's authors.

Lessons I take from this experience:

  • Dependencies are NOT free. This is an old chestnut, It's been well discussed to death. This experience showed me another failure mode.
  • There needs to be a way to easily choke off pendantic test output. Also, it would be nice if you could set a "fail fast" mode where we skip all remaining tests on the first failure.
  • Moose really needs to do something about its error messages. stvn and crew already know about this and would like to fix it, but it isn't a simple problem.
  • The cleanest, clearest, most elegant code in the world is useless if I can't run it.

Update:

I installed MooseX::SetOnce and then Dist::Zilla finally installed. Here's hoping that in a week or two I'll be able to write a meditation called "Why I love Dist::Zilla".


TGI says moo


In reply to Why I hate Dist::Zilla by TGI

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (4)
As of 2024-04-25 16:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found