-
-
Notifications
You must be signed in to change notification settings - Fork 297
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
Abbreviated stack traces #3006
Comments
Thanks @cstjean! Let's implement it in Pluto! The first step here is to figure out how this is done in the REPL. Maybe you can find it by searching the Julia source code for the The second step is to add it to Pluto! We need to modify the function Check out https://github.com/fonsp/Pluto.jl/tree/main/src/runner/PlutoRunner#development-tip when working on this issue! |
I'm 99% sure the PR and relevant function is in https://github.com/JuliaLang/julia/pull/49795/files#diff-c616894fef3ba781d1e1cf77a08e69f366ffd9e5b1cfe1220e7bdae85377e0b2R2537. Given that it merely parses the stacktrace's String and returns a String, it should be straight-forward. The main issue might be I unfortunately cannot contribute to open-source given my present employment, but it may change in the future... |
Clicking to see more is definitely possible! Not too hard to implement. We can start by showing just the truncated stack frame. Later, we can implement clicking-to-see-more by adding both versions ( |
@cstjean Could you also post a snippet of code that generates a very long stack trace? EDIT this one is used by the Julia tests, check the difference between Pluto and REPL: # ╔═╡ 6ed41642-644b-11ef-1190-8ddd8aa72d7c
begin
struct F49231{a,b,c,d,e,f,g} end
(::F49231)(a,b,c) = error("oops")
end
# ╔═╡ ffe76e2f-60b1-4da9-a165-a40d14364db2
F49231{Vector,Val{'}'},Vector{Vector{Vector{Vector}}},Tuple{Int,Int,Int,Int,Int,Int,Int},Int,Int,Int}()(1,2,3) |
@cstjean If you have more ideas please let us know! |
Julia 1.10 introduced abbreviated stack traces at the REPL, where some of type information is omitted (printed as
...
), eg.This is critical for working with parametric-type-enthusiastic packages, like ModelingToolkit.jl. I frequently get stack traces which are over a hundred pages long in Pluto, whereas at the REPL it is a few pages at most. The above renders as
(though this is not a great example of the problem, sorry).
Is there a way to get REPL-like abbreviated stack traces in Pluto?
Note: I'm on Pluto 1.19.42, apologies if this has been fixed since.
The text was updated successfully, but these errors were encountered: