Skip Menu |

This queue is for tickets about the Variable-Magic CPAN distribution.

Report information
The Basics
Id: 98525
Status: resolved
Priority: 0/
Queue: Variable-Magic

People
Owner: Nobody in particular
Requestors: ether [...] cpan.org
KENTNL [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.53
Fixed in: 0.54



Subject: Fails tests on blead

# Using Capture::Tiny 0.25

#   Failed test 'die in free callback at compile time and not in eval string'
#   at t/17-ctl.t line 407.
#                   'raddish at -e line 1.
# raddish at -e line 1.
# Execution of -e aborted due to compilation errors.
# '
#     doesn't match '(?^:^raddish at \-e line \d+\.
# Execution(?s:.*)$)'
# Looks like you failed 1 test of 96.
t/17-ctl.t ........
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/96 subtests



# Using Symbol 1.07
t/34-glob.t ....... ok

#   Failed test 'stash: function calls'
#   at t/35-stash.t line 99.
#     Structures begin differing at:
#          $got->{fetch}[1] = 'eat'
#     $expected->{fetch}[1] = 'shoot'
# Looks like you failed 1 test of 43.
t/35-stash.t ......
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/43 subtests
t/40-threads.t .... skipped: This Variable::Magic isn't thread safe
t/41-clone.t ...... skipped: This Variable::Magic isn't thread safe
t/80-leaks.t ...... ok

Looking at report metadata looks like it started failing between

v5.21.3-121-g35c2140 and v5.21.3-204-gef0f35a

On Tue Sep 02 05:37:10 2014, KENTNL wrote: Show quoted text
> # Using Capture::Tiny 0.25 > > # Failed test 'die in free callback at compile time and not in eval string' > # at t/17-ctl.t line 407. > # 'raddish at -e line 1. > # raddish at -e line 1. > # Execution of -e aborted due to compilation errors. > # ' > # doesn't match '(?^:^raddish at \-e line \d+\. > # Execution(?s:.*)$)' > # Looks like you failed 1 test of 96. > t/17-ctl.t ........ > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/96 subtests > > > > # Using Symbol 1.07 > t/34-glob.t ....... ok > > # Failed test 'stash: function calls' > # at t/35-stash.t line 99. > # Structures begin differing at: > # $got->{fetch}[1] = 'eat' > # $expected->{fetch}[1] = 'shoot' > # Looks like you failed 1 test of 43. > t/35-stash.t ...... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/43 subtests > t/40-threads.t .... skipped: This Variable::Magic isn't thread safe > t/41-clone.t ...... skipped: This Variable::Magic isn't thread safe > t/80-leaks.t ...... ok > > Looking at report metadata looks like it started failing between > > v5.21.3-121-g35c2140 and v5.21.3-204-gef0f35a
The attached patch should get Variable::Magic passing it’s tests again as of blead commit 10c25cd94 which I just made. Now the number of magic calls is back to what it was back in perl 5.10. Basically, 5.12 introduced an extra call, so that barewords would do ‘fetch store store’ on the stash. (‘Store’ sounds strange; it’s actually a vivifying fetch.) Commit 211a4342c changed the second store (added in 5.12) to a fetch. So the test started failing. The commit I made today eliminates the first fetch, which has actually been redundant most of the time. While I still plan to make more changes in this area, I don’t think they will affect the number of magic calls. So if you want to make a new release now, go ahead. (And then Andreas can get his smokes back.)
Subject: open_BUc83oif.txt
diff -Nurp Variable-Magic-0.53/t/35-stash.t Variable-Magic-0.53-kzLVI9/t/35-stash.t --- Variable-Magic-0.53/t/35-stash.t 2013-06-03 06:19:02.000000000 -0700 +++ Variable-Magic-0.53-kzLVI9/t/35-stash.t 2014-09-03 19:07:32.000000000 -0700 @@ -96,7 +96,9 @@ cast %Hlagh::, $wiz; is $@, "ok\n", 'stash: function calls compiled fine'; is_deeply \%mg, { fetch => \@calls, - store => ("$]" < 5.011_002 ? \@calls : [ map { ($_) x 2 } @calls ]), + store => ("$]" < 5.011_002 || "$]" >= 5.021_004 + ? \@calls + : [ map { ($_) x 2 } @calls ]), }, 'stash: function calls'; } @@ -296,7 +298,7 @@ $_ => sub { CB } qw<fetch store exists delete>); -my $uo_exp = "$]" < 5.011_002 ? 2 : 3; +my $uo_exp = "$]" < 5.011_002 || "$]" >= 5.021_004 ? 2 : 3; $code .= ', data => sub { +{ guard => 0 } }';
On 2014-09-03 22:17:41, SPROUT wrote: Show quoted text
> On Tue Sep 02 05:37:10 2014, KENTNL wrote:
> > # Using Capture::Tiny 0.25 > > > > # Failed test 'die in free callback at compile time and not in eval > > string' > > # at t/17-ctl.t line 407. > > # 'raddish at -e line 1. > > # raddish at -e line 1. > > # Execution of -e aborted due to compilation errors. > > # ' > > # doesn't match '(?^:^raddish at \-e line \d+\. > > # Execution(?s:.*)$)' > > # Looks like you failed 1 test of 96. > > t/17-ctl.t ........ > > Dubious, test returned 1 (wstat 256, 0x100) > > Failed 1/96 subtests > > > > > > > > # Using Symbol 1.07 > > t/34-glob.t ....... ok > > > > # Failed test 'stash: function calls' > > # at t/35-stash.t line 99. > > # Structures begin differing at: > > # $got->{fetch}[1] = 'eat' > > # $expected->{fetch}[1] = 'shoot' > > # Looks like you failed 1 test of 43. > > t/35-stash.t ...... > > Dubious, test returned 1 (wstat 256, 0x100) > > Failed 1/43 subtests > > t/40-threads.t .... skipped: This Variable::Magic isn't thread safe > > t/41-clone.t ...... skipped: This Variable::Magic isn't thread safe > > t/80-leaks.t ...... ok > > > > Looking at report metadata looks like it started failing between > > > > v5.21.3-121-g35c2140 and v5.21.3-204-gef0f35a
> > The attached patch should get Variable::Magic passing it’s tests again > as of blead commit 10c25cd94 which I just made. > > Now the number of magic calls is back to what it was back in perl > 5.10. > > Basically, 5.12 introduced an extra call, so that barewords would do > ‘fetch store store’ on the stash. (‘Store’ sounds strange; it’s > actually a vivifying fetch.) > > Commit 211a4342c changed the second store (added in 5.12) to a fetch. > So the test started failing. > > The commit I made today eliminates the first fetch, which has actually > been redundant most of the time. > > While I still plan to make more changes in this area, I don’t think > they will affect the number of magic calls. So if you want to make a > new release now, go ahead. (And then Andreas can get his smokes > back.)
Smoking CPAN without Variable-Magic is quite senseless nowadays, so for everybody's convenience here's a CPAN.pm distroprefs file with this patch: https://github.com/eserte/srezic-cpan-distroprefs/blob/master/Variable-Magic.yml
This has been fixed in version 0.54. Vincent