New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing test in S32-array/adverbs.t and S32-hash/adverbs.t: Code does not die as expected with 'use <MODULE>' #4813
Comments
From @usev6There are two failing tests (one in S32-array/adverbs.t, one in S32-hash/adverbs.t) that do not die as expected in a spectest. The problem can be golfed as follows: 1) This code dies when it is run standalone: $ ./perl6-m -e 'my %h = b => 2, c => 3; say %h<b>:zorp' 2) Code dies the first time it is executed with 'use Test'. (After a fresh install without any installed rakudo.) $ PERL6LIB=lib ./perl6-m -e 'use Test; my %h = b => 2, c => 3; say %h<b>:zorp' 3) Code does _not_ die when it is executed a second, third ... time with 'use Test'. $ PERL6LIB=lib ./perl6-m -e 'use Test; my %h = b => 2, c => 3; say %h<b>:zorp' 4) If I add a new line with a comment to 'lib/Test.pm' the code again dies at the first execution -- but not afterwards: $ echo "#" >> lib/Test.pm I suspect that this behaviour has somehow to do with precompilation of 'lib/Test.pm'. |
From @lizmat
As an additional datapoint: both tests fail as expected if RAKUDO_MODULE_DEBUG is set to a true value. Liz |
The RT System itself - Status changed from 'new' to 'open' |
From @usev6Looks like this has nothing to do with lib/Test.pm: $ echo '#' > Bar.pm6 Setting RAKUDO_MODULE_DEBUG=1 does still give '2': $ RAKUDO_MODULE_DEBUG=1 ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' |
From @usev6Another data point: The evaluation works as expected with MVM_SPESH_DISABLE=1: $ echo '#' > Bar.pm6 $ MVM_SPESH_DISABLE=1 ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' $ ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' |
From @usev6I just found that my golfed test case seems to be flapping: $ for run in {1..10}; do (echo '#' > Bar.pm6; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1) | grep -c 'Unexpected named parameter'; done Sometimes the second evaluation returns '2', sometimes it gives the desired error. Setting MVM_SPESH_DISABLE=1 looks correct: $ for run in {1..10}; do (echo '#' > Bar.pm6; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1; MVM_SPESH_DISABLE=1 ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1) | grep -c 'Unexpected named parameter'; done |
1 similar comment
From @usev6I just found that my golfed test case seems to be flapping: $ for run in {1..10}; do (echo '#' > Bar.pm6; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1) | grep -c 'Unexpected named parameter'; done Sometimes the second evaluation returns '2', sometimes it gives the desired error. Setting MVM_SPESH_DISABLE=1 looks correct: $ for run in {1..10}; do (echo '#' > Bar.pm6; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1; MVM_SPESH_DISABLE=1 ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1) | grep -c 'Unexpected named parameter'; done |
From @bdwNot sensitive to MVM_SPESH_OSR_DISABLE=1, MVM_SPESH_INLINE_DISABLE=1, 2015-12-18 22:23 GMT+01:00 Christian Bartolomaeus via RT <
|
From @lizmat
Confirm that these tests work ok with MVM_SPESH_DISABLE=1 inside the spectest. Liz |
From @usev6My golfed test cases do no longer fail. $ for run in {1..10}; do (echo '#' > Bar.pm6; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1; ./perl6-m -I. -e 'use Bar; my %h = b => 2; say %h<b>:zorp' 2>&1) | grep -c 'Unexpected named parameter'; done Alas, the tests in S32-hash/adverbs.t and S32-array/adverbs.t still do not pass. Will try to find a new/better golf. |
From @usev6On Sun Apr 24 02:45:35 2016, bartolin@gmx.de wrote:
Not as short as I hoped (it needs Test.pm6), but this is what currently fails in S32-hash/adverbs.t: $ perl6-m -Ilib -e 'use Test; my %h; is %h<B>:p(False), (B=>Any); throws-like q[%h<C>:k:v], Exception, "test 2"; throws-like q[say %h<D>:baxter], Exception, "test 3";' # Failed test 'test 3' If one uses 'is-deeply' instead of 'is', the tests pass. Also with MVM_SPESH_DISABLE=1 the tests pass: $ MVM_SPESH_DISABLE=1 perl6-m -Ilib -e 'use Test; my %h; is %h<B>:p(False), (B=>Any); throws-like q[%h<C>:k:v], Exception, "test 2"; throws-like q[say %h<D>:baxter], Exception, "test 3";' |
From @usev6The tests in S32-array/adverbs. and S32-hash/adverbs.t (and all code snippets in this ticket) are passing again. I'm closing this ticket as 'resolved'. |
1 similar comment
From @usev6The tests in S32-array/adverbs. and S32-hash/adverbs.t (and all code snippets in this ticket) are passing again. I'm closing this ticket as 'resolved'. |
@usev6 - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#126823 (status was 'resolved')
Searchable as RT126823$
The text was updated successfully, but these errors were encountered: