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

Undeclared name error doesn't include filename, similar errors do #3726

Closed
p6rt opened this issue Mar 9, 2015 · 5 comments
Closed

Undeclared name error doesn't include filename, similar errors do #3726

p6rt opened this issue Mar 9, 2015 · 5 comments

Comments

@p6rt
Copy link

p6rt commented Mar 9, 2015

Migrated from rt.perl.org#124027 (status was 'rejected')

Searchable as RT124027$

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

From @drforr

OS​: Ubuntu Linux 10.04.4 LTS (Running in Linode)
Rakudo​: commit cd7c31c6b50b2819faa1795c4a0bf3016dfa04e0
Date​: Mon Mar 9 00​:14​:17 2015 +0100

The compile-time error generated by the script below is missing the
(filename​:line) where the error occurred, which may be different than
the file being compiled.

--cut here--
#!/usr/bin/perl6

my $i = UndeclaredClass.new;
--cut here--

The error that is reported is missing (filename​:line) on line 4 of the
error text​:

--cut here--
===SORRY!=== Error while compiling
/home/jgoff/Documents/cluj_20150305.js/test/polar.t
Undeclared name​:
  UndeclaredClass used at line 5
--cut here--

It should read something like this (with the last line being the
important bit)​:

--cut here--
===SORRY!=== Error while compiling
/home/jgoff/Documents/cluj_20150305.js/test/polar.t
Undeclared name​:
  UndeclaredClass used
at /home/jgoff/Documents/cluj_20150305.js/test/polar.t​:5
--cut here--

Compare the error to one with the (filename​:line) appearing correctly on
line 3 of the error text​:

--cut here--
===SORRY!=== Error while compiling
/home/jgoff/Documents/cluj_20150305.js/test/polar.t
Variable '$i' is not declared
at /home/jgoff/Documents/cluj_20150305.js/test/polar.t​:6
------> $i⏏ = 1;
  expecting any of​:
  postfix
--cut here--

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

From @FROGGS

What I did not spot earlier was that the filename is shown​:

===SORRY!=== Error while compiling /home/jgoff/Documents/cluj_20150305.js/test/polar.t
Undeclared name​:
  UndeclaredClass used at line 5

It is there in the first line after the SORRY.

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

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

@p6rt
Copy link
Author

p6rt commented Mar 9, 2015

@FROGGS - Status changed from 'open' to 'rejected'

@p6rt p6rt closed this as completed Mar 9, 2015
@p6rt
Copy link
Author

p6rt commented Mar 11, 2015

From @drforr

On 2015-03-09 21​:57, Tobias Leich via RT wrote​:

What I did not spot earlier was that the filename is shown​:

===SORRY!=== Error while compiling
/home/jgoff/Documents/cluj_20150305.js/test/polar.t
Undeclared name​:
UndeclaredClass used at line 5

It is there in the first line after the SORRY.

Yes, I noticed that too, but it wasn't in the same position as in the
other errors that I've encountered, that's what prompted me to file the
bug. Feel free to close it if you like.

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

No branches or pull requests

1 participant