Skip Menu |

This queue is for tickets about the SVG CPAN distribution.

Report information
The Basics
Id: 123705
Status: resolved
Priority: 0/
Queue: SVG

People
Owner: MANWAR [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc: HOLCAPEK [...] cpan.org
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.78
Fixed in: 2.80



CC: HOLCAPEK [...] cpan.org
Subject: t/96-perl-critic.t may fail
Some of my smoker systems started to report the following failure: ... # Failed test 'lib/SVG.pm' # at t/96-perl-critic.t line 25. # # Perl::Critic had errors in "lib/SVG.pm": # Exception::Fatal::PolicyDefinition: A bug in a policy was found. # # Unable to create policy "Perl::Critic::Policy::ProhibitSmartmatch": Can't locate object method "new" via package "Perl::Critic::Policy::ProhibitSmartmatch" at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 253. # # # Wed Nov 22 05:51:07 2017 # # Trace begun at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 282 # Perl::Critic::PolicyFactory::_handle_policy_instantiation_exception('Perl::Critic::Policy::ProhibitSmartmatch', undef, 'Can\'t locate object method "new" via package "Perl::Critic::Policy::ProhibitSmartmatch" at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 253.^J') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 254 # Perl::Critic::PolicyFactory::_instantiate_policy('Perl::Critic::PolicyFactory=HASH(0x49705d08)', 'Perl::Critic::Policy::ProhibitSmartmatch', 'Perl::Critic::PolicyConfig=HASH(0x497ca720)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 197 # Perl::Critic::PolicyFactory::create_policy('Perl::Critic::PolicyFactory=HASH(0x49705d08)', '-name', 'Perl::Critic::Policy::ProhibitSmartmatch') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 213 # eval {...} at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/PolicyFactory.pm line 213 # Perl::Critic::PolicyFactory::create_all_policies('Perl::Critic::PolicyFactory=HASH(0x49705d08)', 'Perl::Critic::Exception::AggregateConfiguration=HASH(0x43ca7150)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/Config.pm line 212 # Perl::Critic::Config::_load_policies('Perl::Critic::Config=HASH(0x4926c0a8)', 'Perl::Critic::Exception::AggregateConfiguration=HASH(0x43ca7150)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/Config.pm line 143 # Perl::Critic::Config::_init('Perl::Critic::Config=HASH(0x4926c0a8)') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic/Config.pm line 45 # Perl::Critic::Config::new('Perl::Critic::Config') called at /usr/perl5.26.0p/lib/site_perl/5.26.0/Perl/Critic.pm line 35 # Perl::Critic::new('Perl::Critic') called at /home/cpansand/.cpan/build/2017112203/Test-Perl-Critic-1.03-0/blib/lib/Test/Perl/Critic.pm line 64 # eval {...} at /home/cpansand/.cpan/build/2017112203/Test-Perl-Critic-1.03-0/blib/lib/Test/Perl/Critic.pm line 63 # Test::Perl::Critic::critic_ok('lib/SVG.pm', 'lib/SVG.pm') called at t/96-perl-critic.t line 25 ... (etc) ... It looks like it's a problem in an additional perlcritic policy (cc'ed holcapek) --- but anyway, maybe it's a good idea to make the test an author-only test? Regards, Slaven
While this test failure is indeed an issue that should be corrected, please don't allow pod, critic, coverage or kwalitee tests to run for normal user installs, as they make the installation fail unnecessarily when newer versions of the tester module introduces errors that you cannot anticipate. Also spelling tests are dependent on what dictionaries are installed locally, and critic tests use all plugins that are installed, neither of which can be predicted in advance. Either move these tests to xt/, or guard them with: plan skip_all => "These tests are for authors only!" unless $ENV{AUTHOR_TESTING} or $ENV{RELEASE_TESTING};
Thanks @SREZIC for raising the issue and I agree with your suggestion. I will be releasing the patch sometimes early next week after the LPW 2017. Best Regards, Mohammad S Anwar
Hi @ETHER, Point well taken :-) I will address the issue asap. Best Regards, Mohammad S Anwar
From: devans [...] macports.org
On Fri Nov 24 05:28:23 2017, MANWAR wrote: Show quoted text
> Hi @ETHER, > > Point well taken :-) > I will address the issue asap. > > Best Regards, > Mohammad S Anwar
Concerning the fix in 1.79, I suggest the following to simplify testing for non-author testers: Check for TEST_AUTHOR BEFORE rather than AFTER the dependency check. No need to check the dependency if TEST_AUTHOR Iis not set and it may entice a non-author tester to install a missing dependency only to find it is a author-only test. The folloowing tests might be considered author-only as well 98-tidyall.t duplicate_credits.t Thanks, Dave Evans MacPorts PERL maintainer
Hi Dave, Show quoted text
> > Concerning the fix in 1.79, I suggest the following to simplify > testing for non-author testers: > > Check for TEST_AUTHOR BEFORE rather than AFTER the dependency check. > No need to check the dependency if TEST_AUTHOR Iis not set and it may > entice a non-author tester to install a missing dependency only to > find it is a author-only test.
Agreed :-) Show quoted text
> > The folloowing tests might be considered author-only as well > > 98-tidyall.t
Agreed :-) Show quoted text
> duplicate_credits.t
In my humble opinion, this should *NOT* be author only. Many Thanks. Best Regards, Mohammad S Anwar
Resolved.