xenoterracide / Dist-Zilla-Plugin-Test-PodSpelling

Author tests for POD spelling
http://search.cpan.org/dist/Dist-Zilla-Plugin-Test-PodSpelling/
2 stars 10 forks source link

register Test::Spelling as a develop prereq #25

Closed haarg closed 10 years ago

xenoterracide commented 10 years ago

how's this beneficial over listing as authordep? or otherwise in dist.ini (can do [DevelopRequires] or so. also is there an actual benefit to develop prereqs now? last I checked nothing really supported them.

haarg commented 10 years ago

develop prereqs are supported by cpanm using the --with-develop flag.

Author deps are the dependencies needed by Dist::Zilla to package the dist. The test ends up as part of the dist, so it should be included with the dist metadata.

The specific use case I have for this is for travis testing, where I'm generating the dist with a different perl from the one running the test. I need to get a list of the prereqs for building and testing, including the xt tests. The appropriate place for those prereqs is in develop.

xenoterracide commented 10 years ago

still is there any benefit to doing it with code? seems like this should all go in dist.ini... or is this adding a develop requires to consumers of the module? I'd be interested to know if you've somehow managed to get this working on travis, because it doesn't normally have a spellchecker installed.

haarg commented 10 years ago

It adds it as a develop prereq to any dist that uses this plugin. Why would you want it to be listed separately in the dist.ini when it should be applied to every dist using this plugin?

xenoterracide commented 10 years ago

for some reason I was thinking you were adding it as as develop requires to this dist. tired brain, I'm looking at this at the beginning and end of my days, sounds good though. I'll merge, debating on waiting for rjbs to release another dzil though, as the next'll have lower EUMM deps (read none)

xenoterracide commented 10 years ago

I am unhappy, travis is not running this, but it doesn't pass the test suite locally.

#   Failed test 'Test::Perl::Critic for "blib/lib/Dist/Zilla/Plugin/Test/PodSpelling.pm"'
#   at /home/xenoterracide/perl5/perlbrew/perls/perl-5.18.2/lib/site_perl/5.18.2/Test/Perl/Critic.pm line 110.
# 
# Perl::Critic found these violations in "blib/lib/Dist/Zilla/Plugin/Test/PodSpelling.pm":
# [Subroutines::RequireFinalReturn] Subroutine "register_prereqs" does not end with "return" at line 154, near 'sub register_prereqs {'.  (Severity: 4)
# Looks like you failed 1 test of 2.
xt/author/critic.t ..... Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests 

since it's "void" it should just call return;

haarg commented 10 years ago

I've rebased the branch and added the missing return statement. It passes the tests now for me.

xenoterracide commented 10 years ago

it appears my travis settings were still on some of the hacks I was trying for GitCommit... travis is working now, and the tests fail. I didn't run release tests earlier (honestly I wish pod coverage wasn't a release test). That fails, should document it and mention that it adds DevelopRequires now.

haarg commented 10 years ago

I've added a note in the docs about the prereq, and excluded the sub from pod coverage testing.

xenoterracide commented 10 years ago

yeah, I'll merge and release later, gotta get back to my personal laptop tonight