-
Notifications
You must be signed in to change notification settings - Fork 24
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
OhMyRepl crashes julia-snail #173
Comments
Strange. I cannot reproduce the problem. Using Julia 1.11.3 to test. I did have to use this workaround to get OhMyREPL to load from the startup file. I can think of two possibilities. One, maybe OhMyREPL initialization and precompilation do something unexpected. Does it fully work for you from a non-Snail REPL instance? Two, maybe your OhMyREPL setup confuses the Snail prompt detector. Do you customize your Julia prompt in some unusual way? Extra colors, extra text? |
I'm on Julia 1.11.2. |
Do you use vterm or eat for the Snail REPL? If it’s vterm, could you try eat? |
I use vterm. I tried with eat, got the exact same behaviour (except for some reason I don't have any colors in my eat buffer, didn't check if this has anything to do with Julia). I figured if I call (julia-snail--repl-enable) from inside the vterm buffer then snail retries to start the server from the repl, which gives an error since it's already running: julia> JuliaSnail.start(10011) ; # please wait, time-to-first-plot...
ERROR: IOError: listen: address already in use (EADDRINUSE)
Stacktrace:
[1] uv_error
@ ./libuv.jl:106 [inlined]
[2] #listen#13
@ /nix/store/wc3b5zkh1ffzl5qi26wy964b27dn6f8h-julia-bin-1.11.2/share/julia/stdlib/v1.11/Sockets/src/Sockets.jl:632 [inlined]
[3] listen But then Snail still manages to connect to the REPL session, I get the message
and I can go on with the session. I believe the problem comes from how snail detects the Julia initialization: I get JuliaSnail.start(10011) ; # please wait, time-to-first-plot...
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.11.2 (2024-12-01)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
and then once the 15 failed attempts finish, the server gets initialised:
Could it be my zsh prompt (zsh is my default shell which gets initialised with any vterm buffer) interfering? |
I don't think zsh has anything to do with it. This looks like the unfortunately synchronous dance between getting Julia to start a Snail server and for Emacs to try connecting to it has some missteps. The idea is this:
Maybe OhMyREPL initialization takes such a long time that it hits the delay timeouts. What if you change the original REPL wait delay from 3000 ms to 5000 ms (or even 30000 ms)? The delay is relatively short because there is no good code in there (at least right now) to detect a Julia crash on startup, and it's weird if it doesn't fail quickly. |
I recently installed julia-snail.
I experienced a bug when trying to launch julia-snail with C-c C-z, and got
In the REPL buffer I would see
and then only once the last attempt to make a connection was finished, I got the line
Then I didn't find a way to make a connection again.
The problem disappeared when I removed the lines
from my
startup.jl
file, hence there seems to be an incompatibility between the OhMyREPL initialization and the julia-snail initialization.Apologies if the issue is poorly written, I have little experience doing this.
The text was updated successfully, but these errors were encountered: