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

Short-form REPL error output #27305

Closed
rafaqz opened this issue May 29, 2018 · 7 comments
Closed

Short-form REPL error output #27305

rafaqz opened this issue May 29, 2018 · 7 comments
Labels
display and printing Aesthetics and correctness of printed representations of objects. error handling Handling of exceptions by Julia or the user

Comments

@rafaqz
Copy link
Contributor

rafaqz commented May 29, 2018

Error output can be thousands of lines using packages like Unitful and DifferentialEquations in the REPL. Its an insane amount of scrolling, and can cut off completely in some terminals.

Discussed on discourse:
https://discourse.julialang.org/t/units-errors-and-type-display/11220

Solution: REPL errors are shortened, and somehow don't print all the type information.
REPL.reshow_error() is there if you do need to see it all.

@rafaqz rafaqz changed the title Short-form REPL output Short-form REPL error output May 29, 2018
@JeffBezanson JeffBezanson added error handling Handling of exceptions by Julia or the user display and printing Aesthetics and correctness of printed representations of objects. labels May 29, 2018
@JeffBezanson
Copy link
Member

We could make better use of :limit printing here. In :limit and/or :compact mode we could omit module prefixes. In :limit mode we could elide type parameters after a certain number.

@Petr-Hlavenka
Copy link
Contributor

It would be also nice to be able to define aliases or alias patterns where one (may be the package author) could define them to improve type definition readability.

Unitful.Quantity{Int64,Unitful.Dimensions{(Unitful.Dimension{:Time}(1//1),)},Unitful.FreeUnits{(Unitful.Unit{:Second,Unitful.Dimensions{(Unitful.Dimension{:Time}(1//1),)}}(0, 1//1),),Unitful.Dimensions{(Unitful.Dimension{:Time}(1//1),)}}}

would become Quantity{Int64,Second} or even more compact Int64|u"s".

@rafaqz
Copy link
Contributor Author

rafaqz commented Jun 2, 2018

Somehow the 0.63 update also made the REPL slower, and also slow down over time as some function of error length. I just waited 3 minutes for an error to print.

Any pointers on where to start having a crack at fixing this? errorshow.jl?

@arnavs
Copy link
Contributor

arnavs commented Jul 5, 2019

Checking in from the future: are there any packages or hacks which deal with this issue?

Whenever something goes wrong, there's a lot of scrolling (sometimes hundreds or thousands of lines, as mentioned above.) And in the whole thing, I'm just looking for something like "tell me the function call/LOC."

@BioTurboNick
Copy link
Contributor

Linking this up with #40138 and #40537

@Petr-Hlavenka
Copy link
Contributor

Check the amazing https://github.com/MichaelHatherly/InteractiveErrors.jl

@vtjnash
Copy link
Member

vtjnash commented Feb 1, 2024

We have typealias printing now and abbreviated types in stack printing

@vtjnash vtjnash closed this as completed Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display and printing Aesthetics and correctness of printed representations of objects. error handling Handling of exceptions by Julia or the user
Projects
None yet
Development

No branches or pull requests

6 participants