Skip to content
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

t/lib/croak.t: blocker to strict-by-default #236

Closed
jkeenan opened this issue Aug 18, 2020 · 3 comments
Closed

t/lib/croak.t: blocker to strict-by-default #236

jkeenan opened this issue Aug 18, 2020 · 3 comments
Assignees

Comments

@jkeenan
Copy link
Collaborator

jkeenan commented Aug 18, 2020

As of commit ac6b7cc in the alpha-dev-02-strict branch on Aug 18 2020, the file cited is failing. Here is output from cd t; ./perl harness -v <file>; cd -:

# t/lib/croak.t

PROG: 
# to check PADHV without hitting the reported error limit
push %a, 1;
pop %a;
shift %a;
unshift %a, 1;
EXPECTED:
Type of arg 1 to push must be array (not private hash) at - line 3, near "1;"
Type of arg 1 to pop must be array (not private hash) at - line 4, near "%a;"
Type of arg 1 to shift must be array (not private hash) at - line 5, near "%a;"
Type of arg 1 to unshift must be array (not private hash) at - line 6, near "1;"
Execution of - aborted due to compilation errors.
EXIT STATUS: != 0
GOT:
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 2.
Type of arg 1 to push must be array (not hash dereference) at - line 2, near "1;"
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 3.
Type of arg 1 to pop must be array (not hash dereference) at - line 3, near "%a;"
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 4.
Type of arg 1 to shift must be array (not hash dereference) at - line 4, near "%a;"
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 5.
Type of arg 1 to unshift must be array (not hash dereference) at - line 5, near "1;"
Execution of - aborted due to compilation errors.
EXIT STATUS: 255
# Failed test 51 - better messages for array-ops on non-arrays (part 2) at lib/croak/op line 241
lib/croak.t .. 
1..174
# From lib/croak/gv
ok 1 - $\# is no longer supported as of Perl 5.30 [RT \#133583]
ok 2 - $* is no longer supported as of Perl 5.30 [RT \#133583]
...

# From lib/croak/op
ok 17 - join,
ok 18 - my $<special>
...
ok 50 - better messages for array-ops on non-arrays
not ok 51 - better messages for array-ops on non-arrays (part 2)
# From lib/croak/pp
ok 52 - our @a->{0}
...
ok 174 - [perl \#130675]
Failed 1/174 subtests 
	(less 3 skipped subtests: 170 okay)

Test Summary Report
-------------------
lib/croak.t (Wstat: 0 Tests: 174 Failed: 1)
  Failed test:  51
Files=1, Tests=174,  1 wallclock secs ( 0.06 usr  0.00 sys +  0.62 cusr  0.20 csys =  0.88 CPU)
Result: FAIL

@atoomic @toddr

Thank you very much.
Jim Keenan

@jkeenan jkeenan added the blocker-to-strict-by-default Blocks completion of Objective 2, strict on by default label Aug 18, 2020
@jkeenan
Copy link
Collaborator Author

jkeenan commented Aug 20, 2020

This test was written by @tonycoz in 2016 but not actually applied to Perl 5 blead until Jan 2019. It was written in response to a bug report which is now Perl/perl5#15774.

@jkeenan jkeenan added the need-review fixed review pending label Aug 20, 2020
@jkeenan
Copy link
Collaborator Author

jkeenan commented Aug 20, 2020

As of commit ac6b7cc in the alpha-dev-02-strict branch on Aug 18 2020, the file cited is failing. Here is output from cd t; ./perl harness -v <file>; cd -:

# t/lib/croak.t

PROG: 
# to check PADHV without hitting the reported error limit
push %a, 1;
pop %a;
shift %a;
unshift %a, 1;
EXPECTED:
Type of arg 1 to push must be array (not private hash) at - line 3, near "1;"
Type of arg 1 to pop must be array (not private hash) at - line 4, near "%a;"
Type of arg 1 to shift must be array (not private hash) at - line 5, near "%a;"
Type of arg 1 to unshift must be array (not private hash) at - line 6, near "1;"
Execution of - aborted due to compilation errors.
EXIT STATUS: != 0
GOT:
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 2.
Type of arg 1 to push must be array (not hash dereference) at - line 2, near "1;"
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 3.
Type of arg 1 to pop must be array (not hash dereference) at - line 3, near "%a;"
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 4.
Type of arg 1 to shift must be array (not hash dereference) at - line 4, near "%a;"
Global symbol "%a" requires explicit package name (did you forget to declare "my %a"?) at - line 5.
Type of arg 1 to unshift must be array (not hash dereference) at - line 5, near "1;"
Execution of - aborted due to compilation errors.
EXIT STATUS: 255
# Failed test 51 - better messages for array-ops on non-arrays (part 2) at lib/croak/op line 241
lib/croak.t .. 
1..174

[snip]

This should be fixed by 2652f01. @atoomic, can you review?

Thank you very much.
Jim Keenan

@atoomic
Copy link
Owner

atoomic commented Aug 20, 2020

this looks good to me
All tests successful.

@atoomic atoomic closed this as completed Aug 20, 2020
@jkeenan jkeenan self-assigned this Aug 20, 2020
@jkeenan jkeenan removed blocker-to-strict-by-default Blocks completion of Objective 2, strict on by default need-review fixed review pending labels Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants