-
-
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
Ensure syntax error locations appear in backtraces #31881
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 tasks
Errors which are thrown directly inside jl_toplevel_eval_flex do not get an entry in the backtrace. The most prominent of these are syntax errors, but there's other cases too. Fix this by constructing a julia expression throwing the appropriate error, and evaling it to generate a julia-level frame.
c42f
force-pushed
the
cjf/syntax-error-in-backtrace
branch
from
April 30, 2019 23:52
0ca9146
to
294b866
Compare
Surprisingly enough all CI has passed here so I don't need to explain away any spurious failures :-) Shall I merge? |
Should be backported? |
@KristofferC I support backporting this — it's fairly minor and a useful improvement IMHO. Note that #31882 depends on this. I only split them because I anticipated #31882 being more difficult / breaking than it is turning out to be. |
KristofferC
pushed a commit
that referenced
this pull request
May 9, 2019
Errors which are thrown directly inside jl_toplevel_eval_flex do not get an entry in the backtrace. The most prominent of these are syntax errors, but there's other cases too. Fix this by constructing a julia expression throwing the appropriate error, and evaling it to generate a julia-level frame. (cherry picked from commit 5b637df)
c42f
added a commit
that referenced
this pull request
May 20, 2019
This reverts the workaround in commit 5b637df, but keeps the tests. This will be handled in a more robust way by the intepreter backtrace machinery.
c42f
added a commit
that referenced
this pull request
May 21, 2019
This reverts the workaround in commit 5b637df, but keeps the tests. This will be handled in a more robust way by the intepreter backtrace machinery.
c42f
added a commit
that referenced
this pull request
May 21, 2019
This reverts the workaround in commit 5b637df, but keeps the tests. This will be handled in a more robust way by the intepreter backtrace machinery.
c42f
added a commit
that referenced
this pull request
May 24, 2019
This reverts the workaround in commit 5b637df, but keeps the tests. This will be handled in a more robust way by the intepreter backtrace machinery.
c42f
added a commit
that referenced
this pull request
May 28, 2019
This reverts the workaround in commit 5b637df, but keeps the tests. This will be handled in a more robust way by the intepreter backtrace machinery.
c42f
added a commit
that referenced
this pull request
Aug 9, 2019
This reverts the workaround in commit 5b637df, but keeps the tests. This will be handled in a more robust way by the intepreter backtrace machinery.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Errors which are thrown directly inside
jl_toplevel_eval_flex
do not get an entry in the backtrace. The most prominent of these are syntax errors, but there's other cases too.Fix this by constructing a julia expression throwing the appropriate error, and
eval
ing it to generate a julia-level frame.This is one step toward removing
LoadError
as part of addressing #31830 but seems useful on its own.I feel like there should be a better way to get an appropriate julia frame into the backtrace but this is relatively simple and expedient.