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

HeaderREPLs might deliver error in the wrong way to the "error printer" #11

Open
KristofferC opened this issue May 10, 2019 · 1 comment

Comments

@KristofferC
Copy link

KristofferC commented May 10, 2019

Got this error from causing an error in Rebugger:

ERROR: 
SYSTEM (REPL): showing an error caused an error
ERROR: MethodError: no method matching keys(::UndefVarError)
Closest candidates are:
  keys(::Core.SimpleVector) at essentials.jl:606
  keys(::Cmd) at process.jl:963
  keys(::LibGit2.GitTree) at /home/kristoffer/.julia/packages/Revise/UtBAC/src/git.jl:52
  ...
Stacktrace:
 [1] pairs(::UndefVarError) at ./abstractdict.jl:132
 [2] findlast(::getfield(Base, Symbol("##727#728")), ::UndefVarError) at ./array.jl:1921
 [3] scrub_repl_backtrace(::UndefVarError) at ./client.jl:95
 [4] display_error(::Base.TTY, ::IOContext{REPL.Terminals.TTYTerminal}, ::UndefVarError) at ./client.jl:105
 [5] display_error(::IOContext{REPL.Terminals.TTYTerminal}, ::UndefVarError) at ./client.jl:113
 [6] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [7] invokelatest at ./essentials.jl:789 [inlined]
 [8] print_response(::IO, ::Any, ::Bool, ::Bool, ::Any) at /home/kristoffer/julia/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:151
 [9] print_response(::REPL.AbstractREPL, ::Any, ::Bool, ::Bool) at /home/kristoffer/julia/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:141
 [10] (::getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(Rebugger, Symbol("##20#21")),HeaderREPLs.HeaderREPL{Rebugger.InterpretHeader},REPL.LineEdit.Prompt})(::Any, ::Any, ::Any) at /home/kristoffer/julia/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:718
 [11] (::getfield(HeaderREPLs, Symbol("#_dorespond#26")){HeaderREPLs.HeaderREPL{Rebugger.InterpretHeader},getfield(REPL, Symbol("#do_respond#38")){Bool,getfield(Rebugger, Symbol("##20#21")),HeaderREPLs.HeaderREPL{Rebugger.InterpretHeader},REPL.LineEdit.Prompt}})(::REPL.LineEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /home/kristoffer/.julia/packages/HeaderREPLs/xrHVE/src/HeaderREPLs.jl:431
 [12] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [13] invokelatest at ./essentials.jl:789 [inlined]
 [14] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIState) at /home/kristoffer/julia/usr/share/julia/stdlib/v1.2/REPL/src/LineEdit.jl:2306
 [15] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /home/kristoffer/julia/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:1038
 [16] run_repl(::REPL.AbstractREPL, ::Any) at /home/kristoffer/julia/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:201
 [17] (::getfield(Base, Symbol("##736#738")){Bool,Bool,Bool,Bool})(::Module) at ./client.jl:390
 [18] #invokelatest#1 at ./essentials.jl:790 [inlined]
 [19] invokelatest at ./essentials.jl:789 [inlined]
 [20] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:374
 [21] exec_options(::Base.JLOptions) at ./client.jl:312
 [22] _start() at ./client.jl:464

I wonder if something like https://github.com/JuliaDebug/Debugger.jl/blob/859beeaf1d608ff0bc5531f3c2a0dacc878f5e7d/src/repl.jl#L196-L212 is needed.

@timholy
Copy link
Owner

timholy commented May 11, 2019

There was timholy/Rebugger.jl#69, but I guess in v"1.2.0-DEV.253" the order changed. Thanks for the report, will fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants