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 for unclosed multiline comments points to last line of the file #4262

Closed
p6rt opened this issue May 25, 2015 · 10 comments
Closed
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded

Comments

@p6rt
Copy link

p6rt commented May 25, 2015

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

Searchable as RT125247$

@p6rt
Copy link
Author

p6rt commented May 25, 2015

From @AlexDaniel

Code like this​:

#!/usr/bin/env perl6
#`{{
some
comments
here

Gives this error message​:

===SORRY!=== Error while compiling ./test.pl
Couldn't find terminator }}
at ./test.pl​:6
------> <BOL>⏏<EOL>
  expecting any of​:
  horizontal whitespace
  vertical whitespace
  whitespace

There are two problems that I can see​:
1) It says something about horizontal/vertical whitespace, which is not
helpful and not relevant.
2) It does not provide a meaningful line number. I expect to see the line
number where this multiline comment was opened, but instead it gives me the
line number of the last line of the file (which makes sense to the
compiler, since that's where the error has occurred, but does not make any
sense to the human).

@p6rt
Copy link
Author

p6rt commented May 29, 2015

From @hoelzro

On Mon May 25 09​:09​:02 2015, alex.jakimenko@​gmail.com wrote​:

Code like this​:

#!/usr/bin/env perl6
#`{{
some
comments
here

Gives this error message​:

===SORRY!=== Error while compiling ./test.pl
Couldn't find terminator }}
at ./test.pl​:6
------> <BOL>⏏<EOL>
expecting any of​:
horizontal whitespace
vertical whitespace
whitespace

There are two problems that I can see​:
1) It says something about horizontal/vertical whitespace, which is not
helpful and not relevant.
2) It does not provide a meaningful line number. I expect to see the line
number where this multiline comment was opened, but instead it gives me the
line number of the last line of the file (which makes sense to the
compiler, since that's where the error has occurred, but does not make any
sense to the human).

I've addressed both of the issues here in Rakudo.

@p6rt
Copy link
Author

p6rt commented May 29, 2015

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

@p6rt
Copy link
Author

p6rt commented May 31, 2015

From @AlexDaniel

Yeah! It says this now​:

===SORRY!=== Error while compiling ./test.pl
Couldn't find terminator ) (corresponding ( was at line 7)
at ./test.pl​:10
------> <BOL>⏏<EOL>
  expecting any of​:
  )

This can be closed.

On Fri, May 29, 2015 at 5​:19 PM, Rob Hoelz via RT <
perl6-bugs-followup@​perl.org> wrote​:

On Mon May 25 09​:09​:02 2015, alex.jakimenko@​gmail.com wrote​:

Code like this​:

#!/usr/bin/env perl6
#`{{
some
comments
here

Gives this error message​:

===SORRY!=== Error while compiling ./test.pl
Couldn't find terminator }}
at ./test.pl​:6
------> <BOL>⏏<EOL>
expecting any of​:
horizontal whitespace
vertical whitespace
whitespace

There are two problems that I can see​:
1) It says something about horizontal/vertical whitespace, which is not
helpful and not relevant.
2) It does not provide a meaningful line number. I expect to see the line
number where this multiline comment was opened, but instead it gives me
the
line number of the last line of the file (which makes sense to the
compiler, since that's where the error has occurred, but does not make
any
sense to the human).

I've addressed both of the issues here in Rakudo.

@p6rt
Copy link
Author

p6rt commented Jun 2, 2015

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

@p6rt
Copy link
Author

p6rt commented Dec 4, 2016

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

@p6rt
Copy link
Author

p6rt commented Dec 4, 2016

From @AlexDaniel

Cannot find any tests for this.

On 2015-05-31 09​:40​:28, alex.jakimenko@​gmail.com wrote​:

Yeah! It says this now​:

== =SORRY!=== Error while compiling ./test.pl
Couldn't find terminator ) (corresponding ( was at line 7)
at ./test.pl​:10
------> <BOL>⏏<EOL>
expecting any of​:
)

This can be closed.

On Fri, May 29, 2015 at 5​:19 PM, Rob Hoelz via RT <
perl6-bugs-followup@​perl.org> wrote​:

On Mon May 25 09​:09​:02 2015, alex.jakimenko@​gmail.com wrote​:

Code like this​:

#! /usr/bin/env perl6
# `{{
some
comments
here

Gives this error message​:

== =SORRY!=== Error while compiling ./test.pl
Couldn't find terminator }}
at ./test.pl​:6
------> <BOL>⏏<EOL>
expecting any of​:
horizontal whitespace
vertical whitespace
whitespace

There are two problems that I can see​:
1) It says something about horizontal/vertical whitespace, which is
not
helpful and not relevant.
2) It does not provide a meaningful line number. I expect to see
the line
number where this multiline comment was opened, but instead it
gives me
the
line number of the last line of the file (which makes sense to the
compiler, since that's where the error has occurred, but does not
make
any
sense to the human).

I've addressed both of the issues here in Rakudo.

@p6rt
Copy link
Author

p6rt commented Dec 10, 2016

From @zoffixznet

Tests now exist​: Raku/roast@da6fde4

@p6rt p6rt closed this as completed Dec 10, 2016
@p6rt
Copy link
Author

p6rt commented Dec 10, 2016

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

@p6rt
Copy link
Author

p6rt commented Oct 7, 2017

From @AlexDaniel

FWIW for those wondering how exactly it was resolved, here's the commit​: rakudo/rakudo@382c78a

On 2016-12-10 10​:10​:48, cpan@​zoffix.com wrote​:

Tests now exist​:
Raku/roast@da6fde4

@p6rt p6rt added LTA Less Than Awesome; typically an error message that could be better testneeded labels Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LTA Less Than Awesome; typically an error message that could be better testneeded
Projects
None yet
Development

No branches or pull requests

1 participant