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

Handle invalid syntax in doctests #1062

Merged
merged 7 commits into from
Jul 10, 2019
Merged

Handle invalid syntax in doctests #1062

merged 7 commits into from
Jul 10, 2019

Conversation

mortenpi
Copy link
Member

@mortenpi mortenpi commented Jul 8, 2019

With this, if you have invalid syntax in a doctest (e.g. julia> 1.2.3), it can be doctested against the correct parse error output. Fix #487.

@mortenpi mortenpi added this to the 0.23.0 milestone Jul 8, 2019
In the terminal, parse errors do not have a backtrace. But we still need
to initialize the result.bt field.
The heuristic in error_to_string which removes the backtrace below the
highest Core.eval call works in most cases, but will fail if
makedocs/doctest gets called in a more complicated context, as there may
sometimes be eval calls higher up in the stacktrace.
On the nightly, syntax errors now get stacktraces, which means that
their output is no longer deterministic. Hence we can't really compare
against the fixed output.
@mortenpi mortenpi merged commit 972a9b1 into master Jul 10, 2019
@mortenpi mortenpi deleted the mp/doctest-syntax-error branch July 10, 2019 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax errors in doctests
1 participant