-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Improve parse_eval_all line number reporting #13444
Improve parse_eval_all line number reporting #13444
Conversation
(I realize that the repetitive |
04e0c9c
to
5e9d02f
Compare
Rebased and passes tests now. |
Improve parse_eval_all line number reporting
This isn't quite correct, it doesn't handle recursive include's correctly so you end up with a bunch of -1 line numbers being reported. One improvement is to move, line 578 of this diff needs to be move right after Ex: LoadError(at "sysimg.jl" line -1: LoadError(at "sysimg.jl" line 241: LoadError(at "linalg.jl" line -1: LoadError(at "linalg.jl" line 225: LoadError(at "linalg/cholesky.jl" line -1: LoadError(at "linalg/cholesky.jl" line 26: UndefVarError(var=:Typer))))))) I also think the load error's need to be improved. Tracing through where the file is included from is pretty useful, but the output needs to be printed in a better way. |
Sorry for the noise on master, but this is more obvious during bootstrap. |
I didn't see your issue or this because it works fine in a debug build (note that
whereas in a release build:
Maybe |
Isn't this mostly an issue during bootstrap? The output is somewhat better in the REPL (see example in the OP). |
Wraps a
LoadError
thrown byjl_parse_eval_all
with the original top-level line/file from the parser.Ref: jump-dev/JuMP.jl#7 where we have a macro expansion that will throw
UndefVarError
:before:
after: