-
Notifications
You must be signed in to change notification settings - Fork 115
Description
Sorry if this has been posted before.
Sometimes I will modify some struct, then, realizing I need to restart my REPL to get the changes, quit:
julia> exit()However, rather than exiting immediately as I have requested, Revise will continue to run (for sometimes a second, if not more), while attempting to load my recent (breaking) changes in to the REPL. This inevitably leads to some ugly and irrelevant error messages like this:
julia> exit()
┌ Warning: Replacing docs for `SymbolicRegression.MLJInterfaceModule.SRRegressor :: Union{}` in module `SymbolicRegression.MLJInterfaceModule`
└ @ Base.Docs docs/Docs.jl:243
┌ Warning: Replacing docs for `SymbolicRegression.MLJInterfaceModule.MultitargetSRRegressor :: Union{}` in module `SymbolicRegression.MLJInterfaceModule`
└ @ Base.Docs docs/Docs.jl:243
┌ Error: Failed to revise /Users/mcranmer/PermaDocuments/SymbolicRegression.jl/src/MLJInterface.jl
│ exception =
│ invalid redefinition of constant MLJInterfaceModule.SRFitResult
│ Stacktrace:
│ [1] top-level scope
│ @ util.jl:609
│ Revise evaluation error at /Users/mcranmer/PermaDocuments/SymbolicRegression.jl/util.jl:609
│
└ @ Revise ~/.julia/packages/Revise/sCmwS/src/packagedef.jl:722
┌ Warning: The running code does not match the saved version for the following files:
│
│ /Users/mcranmer/PermaDocuments/SymbolicRegression.jl/src/MLJInterface.jl
│
│ If the error was due to evaluation order, it can sometimes be resolved by calling `Revise.retry()`.
│ Use Revise.errors() to report errors again. Only the first error in each file is shown.
│ Your prompt color may be yellow until the errors are resolved.
└ @ Revise ~/.julia/packages/Revise/sCmwS/src/packagedef.jl:832That hide whatever I was doing from the end of my terminal screen.
This is a quality of life request: I was wondering if there were any options for automatically turning off Revise whenever the user quits the REPL with exit()?
A workaround that seems to work is to use ctrl-D which does not trigger Revise (so it seems?), avoiding this issue. However this is not usable in some settings – like if I'm ssh'd somewhere and ctrl-D instead exits my entire tmux session or something. So I'd like to have a clean exit command that I can use