On Thu, Jan 23, 2020 at 3:04 PM James E Keenan <jkee...@pobox.com> wrote:
> I have been granted COMAINT status by Paul Fenwick on CPAN distribution > IPC-System-Simple. This distribution is built and maintained using > Dist::Zilla and quite a few Dist::Zilla plugins. I do not, in general, > use Dist::Zilla in any of my own CPAN distributions. It's much too > "auto-magicky" for my needs and taste, so I only use it when, say, I > have to diagnose a test failure in a "CPAN-River-3000" module. > > But in this case I have to use dzil, so I'd like to get some answers to > specific questions en route to formulating what (for me, at least) will > be best practices for maintaining this distribution going forward. > > 1. How do I add a Travis-CI configuration to a distribution maintained > with Dist::Zilla? > > The IPC-System-Simple repository did not have a .travis.yml > configuration file when I cloned the repo, so I added one (attached) > copied from one of my other CPAN distros where it DWIMs. I made no > changes in dist.ini. The only other change I made was to modify a test > to deal with the github issue that led me to request comaintenance on > this distro in the first place. I activated the configuration under my > Travis account and pushed to github. However, the Travis build failed, > here: > > ##### > https://travis-ci.org/jkeenan/ipc-system-simple/jobs/641031415 > ##### > > This build failed with this log output: > > ##### > [DZ] attempt to add META.json multiple times; added by: text from > coderef added by MetaJSON (Dist::Zilla::Plugin::MetaJSON line 91); > filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line 225); > encoded_content added by @Basic/GatherDir > (Dist::Zilla::Plugin::GatherDir line 226) > > [DZ] attempt to add t/author-pod-coverage.t multiple times; added by: > content added by PodCoverageTests (Dist::Zilla::Plugin::InlineFiles line > 33); filename set by ExtraTests (Dist::Zilla::Plugin::ExtraTests line > 54); content set by ExtraTests (Dist::Zilla::Plugin::ExtraTests line > 67); filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line > 225); encoded_content added by @Basic/GatherDir > (Dist::Zilla::Plugin::GatherDir line 226) > > [DZ] attempt to add t/author-pod-syntax.t multiple times; added by: > content added by PodSyntaxTests (Dist::Zilla::Plugin::InlineFiles line > 33); filename set by ExtraTests (Dist::Zilla::Plugin::ExtraTests line > 54); content set by ExtraTests (Dist::Zilla::Plugin::ExtraTests line > 67); filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line > 225); encoded_content added by @Basic/GatherDir > (Dist::Zilla::Plugin::GatherDir line 226) > > [DZ] attempt to add t/author-critic.t multiple times; added by: content > added by Test::Perl::Critic (Dist::Zilla::Plugin::Test::Perl::Critic > line 42); filename set by ExtraTests (Dist::Zilla::Plugin::ExtraTests > line 54); content set by ExtraTests (Dist::Zilla::Plugin::ExtraTests > line 67); filename set by GatherDir (Dist::Zilla::Plugin::GatherDir line > 225); encoded_content added by @Basic/GatherDir > (Dist::Zilla::Plugin::GatherDir line 226) > > [DZ] attempt to add META.yml multiple times; added by: filename set by > GatherDir (Dist::Zilla::Plugin::GatherDir line 225); encoded_content > added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 226); > text from coderef added by @Basic/MetaYAML > (Dist::Zilla::Plugin::MetaYAML line 70) > > [DZ] attempt to add LICENSE multiple times; added by: filename set by > GatherDir (Dist::Zilla::Plugin::GatherDir line 225); encoded_content > added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 226); > content added by @Basic/License (Dist::Zilla::Plugin::License line 37) > > [DZ] attempt to add README multiple times; added by: filename set by > GatherDir (Dist::Zilla::Plugin::GatherDir line 225); encoded_content > added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 226); > content added by @Basic/Readme (Dist::Zilla::Plugin::Readme line 44); > content set by Readme (Dist::Zilla::Plugin::Readme line 61) > > [DZ] attempt to add Makefile.PL multiple times; added by: filename set > by GatherDir (Dist::Zilla::Plugin::GatherDir line 225); encoded_content > added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 226); > content set by MakeMaker (Dist::Zilla::Plugin::MakeMaker line 329); > content added by @Basic/MakeMaker (Dist::Zilla::Plugin::MakeMaker line 144) > > [DZ] attempt to add MANIFEST multiple times; added by: filename set by > GatherDir (Dist::Zilla::Plugin::GatherDir line 225); encoded_content > added by @Basic/GatherDir (Dist::Zilla::Plugin::GatherDir line 226); > bytes from coderef added by @Basic/Manifest > (Dist::Zilla::Plugin::Manifest line 55) > > aborting; duplicate files would be produced at > > /home/travis/perl5/perlbrew/perls/5.30.0/lib/site_perl/5.30.0/Dist/Zilla/App/Command/ > build.pm > line 97. > > The command "build-dist" failed and exited with 255 during . > ##### > > So, what do I need to do to get Dist::Zilla and Travis to play nice with > each other? (Attached: the Travis config I wrote and the existing > dist.ini file.) > It appears the dzil build is being run twice, because of the use of the --auto switch to travis-perl-helpers but also custom build commands. travis-perl-helpers gives two example configs, one using --auto and one using the more detailed commands as your config uses, the combination is causing a duplicate build. https://github.com/travis-perl/helpers -Dan