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
Supress line number if throw X::Package::Stubbed #1154
Conversation
| method message() { | ||
| "The following packages were stubbed but not defined:\n " | ||
| ~ @.packages.join("\n "); | ||
| } | ||
| multi method gist(::?CLASS:D: :$sorry = True, :$expect = True) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these named parameters being given default values but then never used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Does this still output the |
|
@jnthn No, as I added a test in Raku/roast#310 |
|
cc @jnthn @zoffixznet What can we do to make it better and clearer? The only way I can think is about overriding the |
I'm not sure what this PR is fixing, sorry. Don't we normally do want the line numbers? The |
|
Worth a mention: they're not needed 'cus all methods have an implicit |
|
@zoffixznet the TODO line said that line number should be suppressed. Yes, the other multi method was defined in |
|
@moritz added that comment 6 years ago... but I don't understand why we'd want to remove the line number. From what I can tell so far, all this PR should be doing is simply removing that comment.
Seems in this case they do, thought I don't know if it's a bug. It can be shortened to just |
|
Back when I wrote that, the line number was likely one inside the compiler, or maybe the line number where the compunit closes; that is more confusing than helpful for the user. |
Thanks. Now it shows the line number for where the stub is, so I'd say we don't want to suppress anything anymore. @Gnouc, please just remove the comment. |
|
@zoffixznet is that a recent change? With rakudo 2017.08, I get: The error points at line 5, the end of the file, not line 1 where A was stubbed. |
Oh, sorry, I didn't realize it could be pointing there. Yes, it points to the end of file for me as well :) @Gnouc 👍 Thanks! |
The actual params aren't used and aren't needed, but we still need a bit of params to make the method more specific than the one from the role. See also: #1154 https://irclog.perlgeek.de/perl6-dev/2017-09-14#i_15164490
I did that change in 7ba9b7cd6f |
No description provided.