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

Error "Function X::Panda needs parens to avoid gobbling block" when running panda #4251

Open
p6rt opened this issue May 18, 2015 · 9 comments
Labels
JVM Related to Rakudo-JVM

Comments

@p6rt
Copy link

p6rt commented May 18, 2015

Migrated from rt.perl.org#125211 (status was 'open')

Searchable as RT125211$

@p6rt
Copy link
Author

p6rt commented May 18, 2015

From @hoelzro

The full error message​:

===SORRY!===
Function X​::Panda needs parens to avoid gobbling block
at bin/panda​:21
------> Panda { %failed{$x}.push($_) && say $_ }⏏ };
Missing block (apparently taken by 'X​::Panda')
at bin/panda​:21
------> anda { %failed{$x}.push($_) && say $_ } ⏏};

@p6rt
Copy link
Author

p6rt commented May 18, 2015

From @moritz

On 05/18/2015 04​:07 AM, Rob Hoelz (via RT) wrote​:

# New Ticket Created by Rob Hoelz
# Please include the string​: [perl #​125211]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125211 >

The full error message​:

===SORRY!===
Function X​::Panda needs parens to avoid gobbling block
at bin/panda​:21
------> Panda { %failed{$x}.push($_) && say $_ }⏏ };
Missing block (apparently taken by 'X​::Panda')
at bin/panda​:21
------> anda { %failed{$x}.push($_) && say $_ } ⏏};

Could you please supply a self-contained sample code that triggers this
error?

Thanks!

@p6rt
Copy link
Author

p6rt commented May 18, 2015

The RT System itself - Status changed from 'new' to 'open'

@p6rt
Copy link
Author

p6rt commented May 18, 2015

From @FROGGS

Btw, this error pops up when the X​::Panda symbol disappears for some
weird reason. And then the parser thinks it is a sub instead of a type.

Am 18.05.2015 um 09​:28 schrieb Moritz Lenz​:

On 05/18/2015 04​:07 AM, Rob Hoelz (via RT) wrote​:

# New Ticket Created by Rob Hoelz
# Please include the string​: [perl #​125211]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125211 >

The full error message​:

===SORRY!===
Function X​::Panda needs parens to avoid gobbling block
at bin/panda​:21
------> Panda { %failed{$x}.push($_) && say $_ }⏏ };
Missing block (apparently taken by 'X​::Panda')
at bin/panda​:21
------> anda { %failed{$x}.push($_) && say $_ } ⏏};

Could you please supply a self-contained sample code that triggers
this error?

Thanks!

@p6rt
Copy link
Author

p6rt commented May 18, 2015

From @hoelzro

On Mon May 18 00​:29​:00 2015, moritz wrote​:

On 05/18/2015 04​:07 AM, Rob Hoelz (via RT) wrote​:

# New Ticket Created by Rob Hoelz
# Please include the string​: [perl #​125211]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125211 >

The full error message​:

===SORRY!===
Function X​::Panda needs parens to avoid gobbling block
at bin/panda​:21
------> Panda { %failed{$x}.push($_) && say $_ }⏏ };
Missing block (apparently taken by 'X​::Panda')
at bin/panda​:21
------> anda { %failed{$x}.push($_) && say $_ } ⏏};

Could you please supply a self-contained sample code that triggers this
error?

Thanks!

This appears when running perl6 on bin/panda (as of Panda 1159c82); I can try to golf it down.

@p6rt
Copy link
Author

p6rt commented May 23, 2015

From @hoelzro

On Mon May 18 05​:42​:51 2015, rob@​hoelz.ro wrote​:

On Mon May 18 00​:29​:00 2015, moritz wrote​:

On 05/18/2015 04​:07 AM, Rob Hoelz (via RT) wrote​:

# New Ticket Created by Rob Hoelz
# Please include the string​: [perl #​125211]
# in the subject line of all future correspondence about this
issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125211 >

The full error message​:

===SORRY!===
Function X​::Panda needs parens to avoid gobbling block
at bin/panda​:21
------> Panda { %failed{$x}.push($_) && say $_ }⏏ };
Missing block (apparently taken by 'X​::Panda')
at bin/panda​:21
------> anda { %failed{$x}.push($_) && say $_ } ⏏};

Could you please supply a self-contained sample code that triggers
this
error?

Thanks!

This appears when running perl6 on bin/panda (as of Panda 1159c82); I
can try to golf it down.

Git bisect points to 3fb51c7a6a57cefb39eaebd31a52754ab8e4e6d7 in rakudo as the culprit.

@p6rt
Copy link
Author

p6rt commented Jun 27, 2015

From @hoelzro

On 2015-05-22 21​:11​:05, rob@​hoelz.ro wrote​:

On Mon May 18 05​:42​:51 2015, rob@​hoelz.ro wrote​:

On Mon May 18 00​:29​:00 2015, moritz wrote​:

On 05/18/2015 04​:07 AM, Rob Hoelz (via RT) wrote​:

# New Ticket Created by Rob Hoelz
# Please include the string​: [perl #​125211]
# in the subject line of all future correspondence about this
issue.
# <URL​: https://rt-archive.perl.org/perl6/Ticket/Display.html?id=125211 >

The full error message​:

===SORRY!===
Function X​::Panda needs parens to avoid gobbling block
at bin/panda​:21
------> Panda { %failed{$x}.push($_) && say $_ }⏏ };
Missing block (apparently taken by 'X​::Panda')
at bin/panda​:21
------> anda { %failed{$x}.push($_) && say $_ } ⏏};

Could you please supply a self-contained sample code that triggers
this
error?

Thanks!

This appears when running perl6 on bin/panda (as of Panda 1159c82); I
can try to golf it down.

Git bisect points to 3fb51c7a6a57cefb39eaebd31a52754ab8e4e6d7 in
rakudo as the culprit.

I golfed this down (tarball attached), and that commit does *not* seem to be at fault.

@p6rt
Copy link
Author

p6rt commented Jun 27, 2015

From @hoelzro

x-panda-golfed.tar.bz2

@p6rt p6rt added the JVM Related to Rakudo-JVM label Jan 5, 2020
@usev6
Copy link

usev6 commented Apr 3, 2021

The original context of this issue (using Panda) is very, very likely no longer relevant. But if I'm not mistaken there is still a problem in the JVM version (see the rakudo-j command line) with X::Foo disappearing after loading a module that defines X::Bar:

$ mkdir -p gh_old_4251/X
$ cat >gh_old_4251/X/Bar.rakumod
class X::Bar {}
^D
$ ./rakudo-j -Igh_old_4251 -e 'class X::Foo {}; use X::Bar; say so X.WHO<Foo>:exists'
False

The last command outputs True on MoarVM.

Not using the X namespace (that is used for Exceptions) seems to work, too:

$ mkdir -p gh_old_4251/Y
$ cat >gh_old_4251/Y/Bar.rakumod
class Y::Bar {}
^D
$ ./rakudo-j -Igh_old_4251 -e 'class Y::Foo {}; use Y::Bar; say so Y.WHO<Foo>:exists'
True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JVM Related to Rakudo-JVM
Projects
None yet
Development

No branches or pull requests

2 participants