Perl-Critic / PPI

53 stars 44 forks source link

missing configure-requires prereq declaration #166

Open karenetheridge opened 9 years ago

karenetheridge commented 9 years ago

I got this while installing into a virgin 5.20.0 build:

Configuring PPI-1.220
Running Makefile.PL
Can't locate IO/All.pm in @INC (you may need to install the IO::All module) (@INC contains: inc /Volumes/amaretto/Users/ether/.perlbrew/libs/20.0@std/lib/perl5/darwin-2level /Volumes/amaretto/Users/ether/.perlbrew/libs/20.0@std/lib/perl5 /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/site_perl/5.20.0/darwin-2level /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/site_perl/5.20.0 /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/5.20.0/darwin-2level /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/5.20.0 .) at inc/Module/Install/ReadmeFromPod.pm line 8.
BEGIN failed--compilation aborted at inc/Module/Install/ReadmeFromPod.pm line 8.
Compilation failed in require at inc/Module/Install.pm line 307.

But does this plugin even need to be run for the user's installation? You would have already made a README when preparing the distribution for upload. You shouldn't need to have a huge dependency chain just to run Makefile.PL for the user.

adamkennedy commented 9 years ago

It shouldn't be required On Mar 6, 2015 7:14 PM, "Karen Etheridge" notifications@github.com wrote:

I got this while installing into a virgin 5.20.0 build:

Configuring PPI-1.220 Running Makefile.PL Can't locate IO/All.pm in @INC https://github.com/INC (you may need to install the IO::All module) (@INC https://github.com/INC contains: inc /Volumes/amaretto/Users/ether/.perlbrew/libs/20.0@std/lib/perl5/darwin-2level /Volumes/amaretto/Users/ether/.perlbrew/libs/20.0@std/lib/perl5 /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/site_perl/5.20.0/darwin-2level /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/site_perl/5.20.0 /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/5.20.0/darwin-2level /Volumes/amaretto/Users/ether/perl5/perlbrew/perls/20.0/lib/5.20.0 .) at inc/Module/Install/ReadmeFromPod.pm line 8. BEGIN failed--compilation aborted at inc/Module/Install/ReadmeFromPod.pm line 8. Compilation failed in require at inc/Module/Install.pm line 307.

But does this plugin even need to be run for the user's installation? You would have already made a README when preparing the distribution for upload. You shouldn't need to have a huge dependency chain just to run Makefile.PL for the user.

— Reply to this email directly or view it on GitHub https://github.com/adamkennedy/PPI/issues/166.

karenetheridge commented 9 years ago

This line: https://metacpan.org/source/MITHALDU/PPI-1.220/Makefile.PL#L10

should be changed to something like if (-d '.git') to ensure it only runs for authors.

karenetheridge commented 9 years ago

Ah, no, it is the use inc::Module::Install line earlier that is causing issues - apparently it is loading the ReadmeFromPod plugin at line 307. So, just leaving that plugin out of inc will work. You may still want to do the -d '.git' check though (without the eval) to ensure that authors can't accidentally ship the dist without updating the readme.

adamkennedy commented 9 years ago

Module install should already have author detection.

Even if we did that. Something else is broken.

Adam On Mar 6, 2015 8:40 PM, "Karen Etheridge" notifications@github.com wrote:

This line: https://metacpan.org/source/MITHALDU/PPI-1.220/Makefile.PL#L10

should be changed to something like if (-d .git) to ensure it only runs for authors.

— Reply to this email directly or view it on GitHub https://github.com/adamkennedy/PPI/issues/166#issuecomment-77673328.

mjgardner commented 8 years ago

I ran into this issue too while running tests generated by Dist::Zilla::Plugin::Test::LocalBrew, which are release tests. So @adamkennedy may be right and author/release tests are somehow incorrectly being enabled. (Although DZP::Test::LocalBrew does delete @ENV{qw/AUTHOR_TESTING RELEASE_TESTING PERL5LIB/};, so I'm a little confused why this is still happening.