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

LTA error message when referring to a non-existent class whose name contains a '::' in Rakudo #1453

Closed
p6rt opened this issue Dec 21, 2009 · 8 comments
Labels
Bug LTA Less Than Awesome; typically an error message that could be better

Comments

@p6rt
Copy link

p6rt commented Dec 21, 2009

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

Searchable as RT71482$

@p6rt
Copy link
Author

p6rt commented Dec 21, 2009

From @masak

<masak> rakudo​: A​::B
<p6eval> rakudo 8dc189​: invoke() not implemented in class 'Undef' [...]
* masak submits rakudobug

No line number, no file, no indication of which class failed its
lookup, or in fact that this was what went wrong.

@p6rt
Copy link
Author

p6rt commented Aug 14, 2010

From sohtil@gmail.com

With current Rakudo, the error message has improved, but the line number
is still wrong​:

$ cat test.pl
use v6;

A​::B
$ ./perl6 test.pl
Can not find sub A​::B
  in main program body at line 1
$ ./perl6 --version

This is Rakudo Perl 6, version 2010.07-115-g0839993 built on parrot
2.6.0 r48341

@p6rt
Copy link
Author

p6rt commented Aug 14, 2010

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

@p6rt
Copy link
Author

p6rt commented Sep 13, 2011

From @bbkr

NOM

bbkr​:nom bbkr$ ./perl6 -e 'A​::B'
Could not find symbol 'A​::&B'

@p6rt
Copy link
Author

p6rt commented Nov 15, 2012

From @bbkr

2012.10

$ perl6 -e 'A​::B'
Could not find symbol '&B'
  in method <anon> at src/gen/CORE.setting​:9956
  in at src/gen/Metamodel.pm​:2401
  in any find_method_fallback at src/gen/Metamodel.pm​:2389
  in any find_method at src/gen/Metamodel.pm​:925
  in at src/gen/BOOTSTRAP.pm​:827
  in any at src/gen/BOOTSTRAP.pm​:811
  in block at -e​:1

STD complaints about whole 'A​::B' symbol, not just nonexistent B in A​:: namespace.

<bbkr_> std​: A​::B
<p6eval> std 04216b1​: OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Undeclared name​:␤
'A​::B' used at line 1␤Check failed␤FAILED 00​:00 41m␤»

So IMO it cannot be considered fixed with current error message.

@p6rt
Copy link
Author

p6rt commented Mar 5, 2017

From @MasterDuke17

On Thu, 15 Nov 2012 04​:51​:17 -0800, bbkr wrote​:

2012.10

$ perl6 -e 'A​::B'
Could not find symbol '&B'
in method <anon> at src/gen/CORE.setting​:9956
in at src/gen/Metamodel.pm​:2401
in any find_method_fallback at src/gen/Metamodel.pm​:2389
in any find_method at src/gen/Metamodel.pm​:925
in at src/gen/BOOTSTRAP.pm​:827
in any at src/gen/BOOTSTRAP.pm​:811
in block at -e​:1

STD complaints about whole 'A​::B' symbol, not just nonexistent B in
A​:: namespace.

<bbkr_> std​: A​::B
<p6eval> std 04216b1​:
OUTPUT«�[31m===�[0mSORRY!�[31m===�[0m␤Undeclared name​:␤
'A​::B' used at line 1␤Check failed␤FAILED 00​:00 41m␤»

So IMO it cannot be considered fixed with current error message.

$ ./perl6-m -e 'A​::B'
Could not find symbol '&B'
  in block <unit> at -e line 1

Actually thrown at​:
  in block <unit> at -e line 1

$ cat tmp.p6
use v6;

say "hi";
A​::B;
say "bye";

$ ./perl6-m tmp.p6
hi
Could not find symbol '&B'
  in block <unit> at tmp.p6 line 4

Actually thrown at​:
  in block <unit> at tmp.p6 line 4

$ ./perl6-m --version
This is Rakudo version 2017.02-167-ge114d5204 built on MoarVM version 2017.02-24-gd9e0b4e2

Is this error message sufficient?

@p6rt p6rt added the Bug label Jan 5, 2020
@MasterDuke17 MasterDuke17 added the LTA Less Than Awesome; typically an error message that could be better label Feb 8, 2020
@JJ
Copy link

JJ commented May 6, 2020

The error is now much more awesome:

Could not find symbol '&B' in 'A'
  in block <unit> at <unknown file> line 1

Still, it needs someone to understand that namespaces are automatically created this way, and it still assumes (I guess probably due to the lack of sigils) that it's a routine. Not clear if this is a local optimum or it could be awesomer...

@masak
Copy link

masak commented May 7, 2020

I'd say the original problem is way beyond fixed. Closing.

@masak masak closed this as completed May 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug LTA Less Than Awesome; typically an error message that could be better
Projects
None yet
Development

No branches or pull requests

4 participants