Help request: dzil: not found
raforg opened this issue · 4 comments
Hi. I've just started using docker-perl-tester (via github actions). I'm using perl-tester:5.14
to :5.36
and :latest
, and Dist::Zilla
is documented (in the README.md
) as being available from :5.14
onwards, but all my dzil
commands (e.g., dzil authordeps --missing | cpanm --notest
) result in dzil: not found
in the log. Any idea what I'm doing wrong? I checked that /usr/local/bin
is in $PATH,
and it is. Then I added find /usr -type f -name dzil
to the github actions but it found nothing. The dzil
command does come with Dist::Zilla
, doesn't it? Or have I been spoiled by debian's libdist-zilla-perl
package? How do I install dzil
? Also, why isn't it there? I've seen a tutorial online that uses dzil
without any obvious attempt to install it explicitly (https://perlmaven.com/setup-github-actions). What am I missing? I just added find / -type f -name Zilla.pm
to the actions it didn't find Dist::Zilla
. This is looking wierd. I even tried to cpanm --notest Dist::Zilla
but that failed with:
! Configure failed for Dist-Zilla-6.030. See /github/home/.cpanm/work/1683541347.105/build.log for details.`
Configuring Dist-Zilla-6.030 ... N/A
##[error]Process completed with exit code 1.
Any advice would be appreciated. I've included my github actions yml file (without the above experiments) in case that helps.
ci.yml.txt
The errors above were for :5.14
. I just checked your Dockerfile's cpanfile and it doesn't mention Dist::Zilla
until version 5.20 (not 5.14 as stated in the README.md
). Does that mean the README.md
is wrong, and that Dist::Zilla
is only available with :5.20
and above? If so, please fix the README.md
(or make what it says true).
Also, I checked the logs for :latest
, which does have Dist::Zilla
, and it fails differently:
! Finding Test::FailWarnings~"0" on cpanmetadb failed.
! Finding Test::FailWarnings~"0" () on mirror http://www.cpan.org failed.
! Couldn't find module or a distribution Test::FailWarnings~"0"
! Finding Test::Kwalitee~"1.21" on cpanmetadb failed.
! Finding Test::Kwalitee~"1.21" () on mirror http://www.cpan.org failed.
! Couldn't find module or a distribution Test::Kwalitee~"1.21"
I don't know why these modules can't be found (or where the v1.21 comes from).
Maybe I should just abandon using dzil
in github actions, and just run prove -l
.
Dist::Zilla
is only included for Perl >= 5.20
view https://github.com/Perl/docker-perl-tester/blob/main/cpanfile#L75
the doc is probably not up to date and we need to fi it
if ( "$]" >= 5.020 ) {
requires 'Dist::Zilla::PluginBundle::Author::ETHER';
requires 'Dist::Zilla::PluginBundle::Author::OALDERS';
requires 'Dist::Zilla::PluginBundle::DROLSKY';
requires 'Dist::Zilla::PluginBundle::Milla';
requires 'Dist::Zilla::PluginBundle::RJBS';
requires 'Dist::Zilla::Plugin::CopyFilesFromRelease';
requires 'Dist::Zilla::Plugin::Git::Contributors';
requires 'Dist::Zilla::Plugin::OurPkgVersion';
requires 'Dist::Zilla::Plugin::StaticInstall';
requires 'Dist::Zilla::Plugin::Test::ReportPrereqs';
# ...
}
if you need some packages which are missing you can use the https://github.com/perl-actions/install-with-cpanm action for example
- name: install cpanm and multiple modules
uses: perl-actions/install-with-cpanm@stable
with:
install: |
Dist::Zilla
Another::Package
or prefer the syntax using a cpanfile
file
steps:
- uses: actions/checkout@v2
- name: uses install-with-cpanm
uses: perl-actions/install-with-cpanm@stable
with:
cpanfile: "cpanfile"
sudo: false
- run: perl Makefile.PL
- run: make test
@raforg with dzil
you may just want to build once in a later perl
and use the built code in the older perls. See https://github.com/libwww-perl/libwww-perl/blob/master/.github/workflows/dzil-build-and-test.yml for example.
Thanks @atoomic and @oalders. For the moment, I've just switched to testing my code with prove -l. That's working fine. But I do like the dzil-build-and-test.yml approach. I'll probably do that eventually. But for now, I'll submit a pull request to fix the README.md so that others don't waste hours like I did thinking that dzil is available from 5.14-5.19. Thanks again.