-
-
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
purge doctest stacktraces #23988
purge doctest stacktraces #23988
Conversation
LGTM. What about leaving the |
I had that first but then I removed it when I saw you had removed it hehe. |
I will add the stacktrace header back. |
of julia code) when the doctest shows that an exception is thrown, | ||
for example: | ||
|
||
````julia |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this valid markdown?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worked locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
I'm late to this party, but it does appear that the stacktraces are useful. |
[...] | ||
``` | ||
```` | ||
|
||
Examples that are untestable should be written within fenced code blocks starting with ````` ```julia````` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, got it. So this is wrong, for example.
What does "it does appear" mean? Also the stacktraces are kept when they either are relevant to the documentation or when the functions they contain are defined in the neighborhood. It is hard for me to see the argument that showing six lines of internal functions in an example is a user friendly documentation. |
Yeah, I don't really get the pushback against this. 99% of the time no one cares about the stack traces so the default should be not including them. In the 1% cases where it's useful, we can still include it. |
Only one of these is showing 6 frames deep. The top handful of frames, up to the function that actually gets called, is useful to some people - it tells you where the definition is (especially when nicely linked like in IJulia) that's throwing the error in question. In a perfect world code examples in the docs would be shown as live notebook-style runnable snippets with [most of] the actual output. You might want to collapse long backtraces by default and have them easily expandable with a single click, but static markdown docs don't allow that level of interactivity. |
Maybe, the thing to do is merge this, and introduce them in the 1% cases where they clearly may help. |
Since this is one of the main things preventing us from turning doc tests on, we should go ahead with this and if anyone feels that we really need the stack traces in some places, the onus is on them to implement the necessary Documenter.jl feature and insert the desired stack traces. |
0921ac6
to
82122b4
Compare
82122b4
to
6cc988b
Compare
See discussion in #22075
cc @rfourquet