Open vtjnash opened 1 week ago
I'm missing a solution here. This is how external REPL modes are installed AFAIU.
You install REPL hooks by calling empty!
? that doesn't seem very scalable ðŸ˜
empty!
explained and fixed here https://github.com/JuliaLang/Pkg.jl/pull/3934
You install REPL hooks by calling empty!
You linked a much larger piece of code than that single one.
The other major mistake here is calling Base.active_repl
and assuming that returns REPL.active_repl
This code runs on a thread, which makes this an unsafe data race to call this function: https://github.com/JuliaLang/Pkg.jl/blob/8c996799b0ae3d6cccf8a5f25744deb6640adb9e/ext/REPLExt/REPLExt.jl#L311-L321
It is VERY strongly inadvisable to have an
__init__
function defined in this code, due to the unreliability of the environment it runs in, and the corruption this will cause to the REPL module.