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 forgetting to close block inside string in Rakudo #4284

Closed
p6rt opened this issue Jun 1, 2015 · 9 comments
Closed

Comments

@p6rt
Copy link

p6rt commented Jun 1, 2015

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

Searchable as RT125299$

@p6rt
Copy link
Author

p6rt commented Jun 1, 2015

From @drforr

Reading through S26 it doesn't explicitly state that declarator comments
must only occur outside string declaration, but this behavior certainly
seems to violate the principle of least surprise.

--cut here--
use v6;
my $x;
$x ~= "#={";
--cut here--

-cut here--
Unable to parse expression in double quotes; couldn't find final '"'
at foo.pl​:4
------> <BOL>⏏<EOL>
  expecting any of​:
  double quotes
  term
--cut here--

@p6rt
Copy link
Author

p6rt commented Jun 1, 2015

From @FROGGS

FROGGS​: m​: say "#={ 42 }" # DrForr​: your ticket is invalid
camelia​: rakudo-moar c2a57e​: OUTPUT«#=42␤»
FROGGS​: DrForr​: I am closing your ticket now
DrForr​: The error was about the closing quotes, not the interpolation.
FROGGS​: DrForr​: you mean that '"' is mentioned in the error message?
DrForr​: Yes.
FROGGS​: ahh
* FROGGS adds that to the ticket

So, we'd like to see that a closing curly is expected I think.

@p6rt
Copy link
Author

p6rt commented Jun 1, 2015

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

@p6rt
Copy link
Author

p6rt commented Jun 1, 2015

From @masak

On Mon Jun 01 01​:15​:07 2015, FROGGS.de wrote​:

FROGGS​: m​: say "#={ 42 }" # DrForr​: your ticket is invalid
camelia​: rakudo-moar c2a57e​: OUTPUT«#=42␤»
FROGGS​: DrForr​: I am closing your ticket now
DrForr​: The error was about the closing quotes, not the interpolation.
FROGGS​: DrForr​: you mean that '"' is mentioned in the error message?
DrForr​: Yes.
FROGGS​: ahh
* FROGGS adds that to the ticket

So, we'd like to see that a closing curly is expected I think.

Also, as long as we're wishing for ponies and butterflies in the error message​: one thing that Perl 5 still does better is to say where the runaway thing *began*, in this case the block. Because it's often a mistake, the programmer may not be aware of which thing it is that is unbalanced.

My ideal error message would look something like this​:

  Opening curly without closing curly in string -- did you forget to close the block?
  Opening curly found at line 22, col 17
  Expected '"' line 58, col 5, found EOF

@p6rt
Copy link
Author

p6rt commented Jun 1, 2015

From @geekosaur

On Mon, Jun 1, 2015 at 3​:58 AM, via RT <perl6-bugs-followup@​perl.org> wrote​:

# New Ticket Created by
--cut here--
use v6;
my $x;
$x ~= "#={";
--cut here--

-cut here--
Unable to parse expression in double quotes; couldn't find final '"'
at foo.pl​:4

That's not comments being parsed, it's {...} being an embedded expression
(hence "expression in double quotes").

--
brandon s allbery kf8nh sine nomine associates
allbery.b@​gmail.com ballbery@​sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net

@p6rt
Copy link
Author

p6rt commented Dec 1, 2017

From @AlexDaniel

https://irclog.perlgeek.de/perl6/2017-12-01#i_15520545

On 2015-06-01 04​:26​:37, masak wrote​:

On Mon Jun 01 01​:15​:07 2015, FROGGS.de wrote​:

FROGGS​: m​: say "#={ 42 }" # DrForr​: your ticket is invalid
camelia​: rakudo-moar c2a57e​: OUTPUT«#=42␤»
FROGGS​: DrForr​: I am closing your ticket now
DrForr​: The error was about the closing quotes, not the
interpolation.
FROGGS​: DrForr​: you mean that '"' is mentioned in the error message?
DrForr​: Yes.
FROGGS​: ahh
* FROGGS adds that to the ticket

So, we'd like to see that a closing curly is expected I think.

Also, as long as we're wishing for ponies and butterflies in the error
message​: one thing that Perl 5 still does better is to say where the
runaway thing *began*, in this case the block. Because it's often a
mistake, the programmer may not be aware of which thing it is that is
unbalanced.

My ideal error message would look something like this​:

Opening curly without closing curly in string -- did you forget to
close the block?
Opening curly found at line 22, col 17
Expected '"' line 58, col 5, found EOF

@p6rt
Copy link
Author

p6rt commented Dec 2, 2017

From @AlexDaniel

https://irclog.perlgeek.de/perl6/2017-12-02#i_15524141

Marking as 「testneeded」

On 2017-12-01 14​:31​:15, alex.jakimenko@​gmail.com wrote​:

https://irclog.perlgeek.de/perl6/2017-12-01#i_15520545

On 2015-06-01 04​:26​:37, masak wrote​:

On Mon Jun 01 01​:15​:07 2015, FROGGS.de wrote​:

FROGGS​: m​: say "#={ 42 }" # DrForr​: your ticket is invalid
camelia​: rakudo-moar c2a57e​: OUTPUT«#=42␤»
FROGGS​: DrForr​: I am closing your ticket now
DrForr​: The error was about the closing quotes, not the
interpolation.
FROGGS​: DrForr​: you mean that '"' is mentioned in the error message?
DrForr​: Yes.
FROGGS​: ahh
* FROGGS adds that to the ticket

So, we'd like to see that a closing curly is expected I think.

Also, as long as we're wishing for ponies and butterflies in the error
message​: one thing that Perl 5 still does better is to say where the
runaway thing *began*, in this case the block. Because it's often a
mistake, the programmer may not be aware of which thing it is that is
unbalanced.

My ideal error message would look something like this​:

Opening curly without closing curly in string -- did you forget to
close the block?
Opening curly found at line 22, col 17
Expected '"' line 58, col 5, found EOF

@p6rt
Copy link
Author

p6rt commented Feb 4, 2018

From @AlexDaniel

Tests here​: Raku/roast@2dd5ee1

Resolved.

Further discussion on rakudo/rakudo#1475

On 2017-12-02 14​:39​:07, alex.jakimenko@​gmail.com wrote​:

https://irclog.perlgeek.de/perl6/2017-12-02#i_15524141

Marking as 「testneeded」

On 2017-12-01 14​:31​:15, alex.jakimenko@​gmail.com wrote​:

https://irclog.perlgeek.de/perl6/2017-12-01#i_15520545

On 2015-06-01 04​:26​:37, masak wrote​:

On Mon Jun 01 01​:15​:07 2015, FROGGS.de wrote​:

FROGGS​: m​: say "#={ 42 }" # DrForr​: your ticket is invalid
camelia​: rakudo-moar c2a57e​: OUTPUT«#=42␤»
FROGGS​: DrForr​: I am closing your ticket now
DrForr​: The error was about the closing quotes, not the
interpolation.
FROGGS​: DrForr​: you mean that '"' is mentioned in the error message?
DrForr​: Yes.
FROGGS​: ahh
* FROGGS adds that to the ticket

So, we'd like to see that a closing curly is expected I think.

Also, as long as we're wishing for ponies and butterflies in the error
message​: one thing that Perl 5 still does better is to say where the
runaway thing *began*, in this case the block. Because it's often a
mistake, the programmer may not be aware of which thing it is that is
unbalanced.

My ideal error message would look something like this​:

Opening curly without closing curly in string -- did you forget to
close the block?
Opening curly found at line 22, col 17
Expected '"' line 58, col 5, found EOF

@p6rt
Copy link
Author

p6rt commented Feb 4, 2018

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

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

No branches or pull requests

1 participant