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

Stack trace: bracket-matched hiding and expanding and more #3045

Merged
merged 2 commits into from
Oct 4, 2024

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Oct 4, 2024

We now use Julia's built-in (curly-bracket matched) method to shorten type information. (From JuliaLang/julia#49795, suggested by #3006.)

You can click to expand and see all types.

Schermopname.2024-10-04.om.10.55.50.mov

Also notice: the first frame has a big parameterized callable type, but in the unexpanded form, just the name is shown.

Anonymous function

This PR also adds a special case for anonymous functions. Instead of a generated name like #15 or #24#25, it shows "anonymous function" and you can hover to learn what that phrase means:

image

Compare this to the REPL:

image

Highlighted function argument names

The argument names are now highlighted in grey (x in sqrt(x::Float64))

image

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="stack-trace-expand-types")
julia> using Pluto

@fonsp fonsp added the error display How errors and stack traces are presented label Oct 4, 2024
@fonsp fonsp linked an issue Oct 4, 2024 that may be closed by this pull request
@fonsp fonsp changed the title Stack trace: bracket-matched hiding and expanding Stack trace: bracket-matched hiding and expanding and more Oct 4, 2024
@fonsp fonsp merged commit 4190ad0 into main Oct 4, 2024
16 checks passed
@fonsp fonsp deleted the stack-trace-expand-types branch October 4, 2024 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error display How errors and stack traces are presented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Abbreviated stack traces
1 participant