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 message returns a line inside src/Perl6/World.nqp instead of the user's source file in Rakudo #4256

Closed
p6rt opened this issue May 21, 2015 · 4 comments
Labels

Comments

@p6rt
Copy link

p6rt commented May 21, 2015

Migrated from rt.perl.org#125227 (status was 'resolved')

Searchable as RT125227$

@p6rt
Copy link
Author

p6rt commented May 21, 2015

From @masak

<FROGGS> hmmm....
<FROGGS> Compiling lib/Facter.pm to mbc
<FROGGS> useless use of 'is rw' on @​!search_path in any at
src/Perl6/World.nqp​:2498
<moritz> rw on a private attribute looks questionable
<moritz> so does the line number :-)
<FROGGS> error reporting bug me thinks
<FROGGS> it should report this line instead​:
https://github.com/cosimo/perl6-facter/blob/master/lib/Facter.pm#L47
<masak> m​: class T { has $!foo is rw }
<camelia> rakudo-moar 7adde5​: OUTPUT«useless use of 'is rw' on $!foo
in any at src/Perl6/World.nqp​:2498␤»
* masak submits rakudobug

To be clear, the problem is that the error message reports a
file-and-line inside of the Rakudo compiler, instead of (as would be
much more helpful) in the code with the useless use of 'is rw'.

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

From @jnthn

On Thu May 21 06​:05​:08 2015, masak wrote​:

<FROGGS> hmmm....
<FROGGS> Compiling lib/Facter.pm to mbc
<FROGGS> useless use of 'is rw' on @​!search_path in any at
src/Perl6/World.nqp​:2498
<moritz> rw on a private attribute looks questionable
<moritz> so does the line number :-)
<FROGGS> error reporting bug me thinks
<FROGGS> it should report this line instead​:
https://github.com/cosimo/perl6-facter/blob/master/lib/Facter.pm#L47
<masak> m​: class T { has $!foo is rw }
<camelia> rakudo-moar 7adde5​: OUTPUT«useless use of 'is rw' on $!foo
in any at src/Perl6/World.nqp​:2498␤»
* masak submits rakudobug

To be clear, the problem is that the error message reports a
file-and-line inside of the Rakudo compiler, instead of (as would be
much more helpful) in the code with the useless use of 'is rw'.

Fixed this generally so that warnings given when applying traits end up as potential difficulties and have the correct location.

Potential difficulties​:
  useless use of 'is rw' on $!x
  at -e​:1
  ------> class C { has $!x is rw <HERE>}

Added a test for this specific case in integration/weird-errors.t.

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

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

@p6rt
Copy link
Author

p6rt commented Jun 29, 2015

@jnthn - Status changed from 'open' to 'resolved'

@p6rt p6rt closed this as completed Jun 29, 2015
@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant