You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
AbbreviatedStackTraces.jl is a package which essentially shortens stack traces to "your own" code, relying on the (often correct) assumption that you are doing something wrong, not a bunch of julia internals.
Taking the example from their docs, if I am using AbbreviatedStackTraces and type sum([]), I get an easily readable stack trace:
julia>using AbbreviatedStackTraces
[ Info: Precompiling AbbreviatedStackTraces [ac637c84-cc71-43bf-9c33-c1b4316be3d4]
[ Info: Skipping precompilation since __precompile__(false). Importing AbbreviatedStackTraces [ac637c84-cc71-43bf-9c33-c1b4316be3d4].
julia>sum([])
ERROR: MethodError: no method matching zero(::Type{Any})
Closest candidates are:zero(::Type{Union{Missing, T}}) where T
@ Base missing.jl:105zero(::Union{Type{P}, P}) where P<:Period
@ Dates ~/.julia/juliaup/julia-1.9.3+0.aarch64.apple.darwin14/share/julia/stdlib/v1.9/Dates/src/periods.jl:51zero(::FillArrays.Zeros{T, N}) where {T, N}
@ FillArrays ~/.julia/packages/FillArrays/FwMoZ/src/FillArrays.jl:591...
Stacktrace:
[1-12] ⋮ internal
@ Base, Unknown
[13] sum(a::Vector{Any})
@ Base ./reducedim.jl:994
[14] top-level scope
@ REPL[137]:1
Use `err` to retrieve the full stack trace.
If I am instead in pager> mode (or, indeed, if I am notusing AbbreviatedStackTraces) I get a really long error message!
Hum, this will be a difficult one. AbbreviatedStackTraces.jl overrides a lot of functions in REPL.jl. However, we cannot rely on those functions because we need to render them for a pager. It will take either a full rewrite of the REPL mode in TerminalPager.jl or modification in AbbreviatedStackTraces.jl to add an extension to support TerminalPager.jl. I am not sure what is the best approach yet.
I suspected this may be a bigger change. Apart from the substantial amount of time/effort needed for the change, is this something you think is useful and worth working towards (at some point)? Would it help to loop in the maintainer for AbbreviatedStackTraces.jl to hear their view?
AbbreviatedStackTraces.jl
is a package which essentially shortens stack traces to "your own" code, relying on the (often correct) assumption that you are doing something wrong, not a bunch of julia internals.Taking the example from their docs, if I am
using AbbreviatedStackTraces
and typesum([])
, I get an easily readable stack trace:If I am instead in
pager>
mode (or, indeed, if I am notusing AbbreviatedStackTraces
) I get a really long error message!expand really long message!!
The text was updated successfully, but these errors were encountered: