Rebugger.jl icon indicating copy to clipboard operation
Rebugger.jl copied to clipboard

Loading OhMyREPL before Rebugger

Open MrUrq opened this issue 7 years ago • 4 comments

Loading OhMyREPL.jl before Rebugger in the startup.jl file hinders Rebuggers keybindings from working. This happens on Julia 1.0 (tested on two different systems).

Example startup.jl file:

try
    @eval using OhMyREPL
catch err
    @warn "Could not load OhMyREPL"
end

try
    @eval using Revise
    # Turn on Revise's automatic-evaluation behavior
    Revise.async_steal_repl_backend()
catch err
    @warn "Could not load Revise."
end

try
    @eval using Rebugger
    # Activate Rebugger's key bindings
    atreplinit(Rebugger.repl_init)
catch err
    @warn "Could not turn on Rebugger key bindings."
end

This problem does not appear to happen if I start a clean Julia session and load the packages from the REPL one by one.

Putting OhMyREPL last in the sequence of the startup.jl file fixes the problem.

MrUrq avatar Aug 22 '18 12:08 MrUrq

In my setup, putting OhMyREPL in the last place also fixes the problem, but at the cost of broken bracket completion. @MrUrq do you experience the same problem?

adamryczkowski avatar Sep 05 '18 15:09 adamryczkowski

In my setup, putting OhMyREPL in the last place also fixes the problem, but at the cost of broken bracket completion. @MrUrq do you experience the same problem?

Yes, both @MrUrq and myself (we are officemates) experience that OhMyREPL breaks as you describe. We haven't found any solution apart from living with it.

eljungsk avatar Oct 30 '18 15:10 eljungsk

Presumably the solution would be to have a general framework for intercepting the REPL, for example by inserting callbacks. That would involve some changes to the REPL stdlib, presumably.

timholy avatar Oct 30 '18 16:10 timholy

OhMyREPL is basically a hack and overwrites loads of REPL methods because there's no other way to implement things like that, so yes, an actually extensible REPL interface would be great to have.

pfitzseb avatar Oct 30 '18 17:10 pfitzseb