doy / parse-keyword

DEPRECATED: write syntax extensions in perl
http://metacpan.org/release/Parse-Keyword
5 stars 4 forks source link

Test suite fails with bleadperl (5.21.4) due to changed error message #9

Open eserte opened 10 years ago

eserte commented 10 years ago

With perl 5.21.4 the error.t test fails:

#   Failed test at t/error.t line 62.
#          got: 'Global symbol "$baz" requires explicit package name (did you forget to declare "my $baz"?) at t/error.pl line 9.
# Execution of t/error.pl aborted due to compilation errors.
# '                       
#     expected: 'Global symbol "$baz" requires explicit package name at t/error.pl line 9.
# Execution of t/error.pl aborted due to compilation errors.
# '                       
# Looks like you failed 1 test of 21.
t/error.t .....................
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/21 subtests      
cpansprout commented 10 years ago

It looks as though you need something like this, but I haven’t been able to test it, as its dependencies currently fail under debugging builds, which is all I have for blead right now.

diff -rup Parse-Keyword-0.08-KuIAwn-orig/t/error.t Parse-Keyword-0.08-KuIAwn/t/error.t
--- Parse-Keyword-0.08-KuIAwn-orig/t/error.t    2013-10-10 08:45:33.000000000 -0700
+++ Parse-Keyword-0.08-KuIAwn/t/error.t 2014-10-01 22:09:47.000000000 -0700
@@ -59,6 +59,7 @@ SKIP: {
         system($^X, (map { qq[-I$_] } @INC), 't/error.pl')
     });
     is($out, '');
+    $err =~ s/explicit package name \([^)]+\)/explicit package name/;
     is(
         $err,
         <<'ERR'
eserte commented 9 years ago

This patch is available as a CPAN.pm distroprefs file: https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Parse-Keyword.yml

haarg commented 9 years ago

@doy, is there any chance to get this fixed soon? It is an issue for some downstream dists.

doy commented 9 years ago

Parse::Keyword has been unmaintained and deprecated for quite a while now - I highly recommend that there not be any downstream dists.

eserte commented 9 years ago

Parse::Keyword has been unmaintained and deprecated for quite a while now - I highly recommend that there not be any downstream dists.

Too late:

$ echo $(lwp-request 'http://deps.cpantesters.org/depended-on-by.pl?xml=1;dist=Parse-Keyword-0.08' | xmlgrep '//depended_on_by//dist/name' | ~/src/perl/CPAN-Testers-ParallelSmoker/utils/cpan_dist_to_mod.pl | grep -v '#' | grep -v Task::) Reading from STDIN... Devel::GDB::Parser::Breakpoint Kavorka Amazon::DynamoDB Amazon::DynamoDB::Simple MooseX::Storage::IO::AmazonDynamoDB Amazon::SES CloudFlare::Client Gnuplot::Simple Map::Metro App::Map::Metro Dist::Zilla::Plugin::MapMetro::MakeGraphViz Dist::Zilla::MintingProfile::MapMetro::Map Dist::Zilla::Plugin::MapMetro::MakeLinePod Map::Metro::Plugin::Map::Amsterdam Map::Metro::Plugin::Map::Athens Map::Metro::Plugin::Map::Barcelona Map::Metro::Plugin::Map::Berlin Map::Metro::Plugin::Map::Bilbao Map::Metro::Plugin::Map::Brescia Map::Metro::Plugin::Map::Brussels Map::Metro::Plugin::Map::Budapest Map::Metro::Plugin::Map::Copenhagen Map::Metro::Plugin::Map::Gothenburg Map::Metro::Plugin::Hook::Helsinki::Swedish Map::Metro::Plugin::Map::Lille Map::Metro::Plugin::Map::Lyon Map::Metro::Plugin::Map::Madrid Map::Metro::Plugin::Map::Oslo Map::Metro::Plugin::Map::Stockholm Moops Acme::Resume CairoX::Sweet DBIx::Deployer Data::PaginatedTable Kavorka::TraitFor::Parameter::doc Stenciller Pod::Elemental::Transformer::Stenciller MarpaX::Languages::M4 MooX::Object::Pluggable MoopsX::ListObjects MoopsX::TraitFor::Parser::UsingMoose OpenGbg Opendata::GTFS::Feed Perl::Core Pod::Elemental::Transformer::Stenciller Pod::Weaver::Section::Badges Stenciller Syntax::Collection::Basic Mojolicious::Plugin::BootstrapHelpers Syntax::Highlight::WithEmacs WebService::Intercom WebService::Nonoh XML::Simple::Sugar MooseX::Storage::IO::AmazonDynamoDB Net::Google::CalendarV3 Net::Stripe Catalyst::Helper::Model::Net::Stripe OpenGbg Opendata::GTFS::Feed Syntax::Collection::Basic WebService::Intercom Moops Switcheroo

haarg commented 9 years ago

Yes, but that doesn't seem like a good reason to break them unnecessarily. This issue is only because one of the tests is expecting an error message that has changed in perl core.

haarg commented 9 years ago

I was replying to @doy. Given that the issue here is just a broken test and not anything wrong with the code in the module itself, it doesn't seem justified to leave this broken even if it is deprecated.

eserte commented 9 years ago

I was replying to @doy. Given that the issue here is just a broken test and not anything wrong with the code in the module itself, it doesn't seem justified to leave this broken even if it is deprecated.

Sorry for the confusion --- I already deleted my bogus comment.

karenetheridge commented 9 years ago

If tuits are a concern, I'll happily curate this distribution to apply blead patches and mark it as deprecated/not recommended.

frioux commented 9 years ago

FWIW Kavorka is based on this which even more things are depping on. Any chance we could get such a minor issue fixed?

gregoa commented 9 years ago

I came up with a different patch which checks for the different diagnostic messages according to the perl version:

https://anonscm.debian.org/cgit/pkg-perl/packages/libparse-keyword-perl.git/tree/debian/patches/global-symbol-diag.patch

Tested with 5.20.2 and 5.22.0.

Cheers, gregor, Debian Perl Group

reneeb commented 8 years ago

@doy bump! You could give @karenetheridge co-maint...

tobyink commented 7 years ago

FWIW, issue #5 is why @doy deprecated this in the first place. Coderefs returned by the parse_* functions don't close over variables properly. However, this can be worked around using PadWalker, which is what I do in Kavorka, so Parse::Keyword is still of value to me.

If @karenetheridge can't be given permission to release a patched version, I'll be tempted to fork it under a different name, with this limitation and a workaround documented.

haarg commented 7 years ago

I've fixed this in haarg/Parse-Keyword@c82dc530e3f2bc13dda1704d86f4e221a866b5e0 and shipped it as v0.09.

karenetheridge commented 7 years ago

@doy can you close this issue please? or give @haarg write access to the repository? thanks!