-
Notifications
You must be signed in to change notification settings - Fork 138
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
Losing connection to lisp sessions #549
Comments
OK, I see the proximate cause: the buffer-local value of If I set that variable to So I guess what I am looking for is some more graceful way of reconnecting a source buffer to a lisp session. And I'm wondering why these buffer variables persist over the "sayoonara" command. It looks like Would it make sense to revise |
I just stumbled a similar situation. I restarted the lisp process and then (defun sly-current-connection ()
"Return the connection to use for Lisp interaction.
Return nil if there's no connection."
(or sly-dispatching-connection
sly-buffer-connection
sly-default-connection))
|
Until a some kind of controlled and reproducible experiment demonstrates this problem, say at least 1 in 5 times, it's hard for me to comment on such abstract problems. |
np, I'll keep an eye out to see if it happens again. It's the first time I encounter this bug. Also, in the end I restarted my whole emacs to "fix" it. :/ |
Uh, it happened again. I restarted the lisp process, (same as first time, by using Now it's in a weird state....
Finally, I evaluated I tried |
Happens to me as well. I can reproduce this way:
Edit: So it cannot be used to reproduce on another machine. I will check my configuration to see why it does lead there to the described situation. |
Hmmm. Why do you do these things?? Is killing inferior lisp a part of your normal workflow?? Because I can "reproduce" a horrible errors in even the stablest of computer programs if one if the steps of my reproduction recipe is |
No, this was how to reproduce. In real situations, sbcl dies or ends up in low-level debugger (and yes, it happens ocasionaly), and then I kill the buffer. |
A valid reproduction recipe for demonstrating a bug on software XYZ means showing legitimate interactions with XYZ and proving that XYZ mishaves as a consequence. Forcibly tripping SLY by deleting one of its structural underpinnings, the inferior lisp process, is not a legitimate interaction.
I'd say that's a bug in SBCL right? There's very little SLY can do to recover from such a drastic situation. |
Maybe it could be "as simple" as adding validation to Just imagine someone new to common lisp, trying to learn CL, emacs and sly... They would probably not understand any of this... It would be good for the "user experience" to try to make sly more robust. What do you think? |
Really? What mistake in a
That already happens.
I don't know what "next sly commands" you are talking of, but if they include talking to the Lisp process, and the vast majority of them do, it's impossible, because the Lisp process has died. It's fair to say that your problem, whatever it is that I haven't understood yet, is completely unrelated to the original problem described by the original poster. So please start a new issue or discussion explaining exactly what you want to recover from and how. |
Let me try again to explain with the context, and supplement a bit. Story so far:
Now I am not sure whether you meant that once I kill one instance of inferior lisp, sly cant be expected to work with other inferior lisp instances, if so, fair enough. And I still think that this problem is closely related to the problem of the original poster, if not same. Anyway, I did some more digging, and apparently I do not see how it can happen normally, except when code run in Still, would you principially object to a patch to fix this - admitedly user induced - misbehaviour if I get to writing it? |
Exactly. Just like a house catching fire, dog eating homework, etc. Further I showed how SLY reacts reasonably when that happens. Even when it happens illegitimately (such as you killing it from the inferior buffer), SLY still reacts fine.
I'm fine if you want to show code. In fact, you should show some code because most of what you write is incomprehensible to me. If you show some code (and it is simple) maybe I will understand what you mean. And please, in a separate issue. A GitHub PR is fine. |
Here's an example of the problem: I have started interactively editing CL code with a repl that I call "m1-allegro" (it's running the beta of Allegro CL for Apple Silicon). Eventually, I get the image so messed up that I kill it and want to restart. At this point I start having troubles:
*sly-mrepl for m1-allegro*
buffer, I get*sly-mrepl for m1-allegro*<2>
.I also get odd behaviors if I have two MREPL buffers open (e.g., I was trying to check the behavior of my code on both Allegro and SBCL).
I get the same error plus an empty window with a "Waiting for creation ack for channel ..." (for n a small number) if I try to use the "C-c C-z" keybinding to go to the current connection.
Setting the default connection using
sly-list-connection
andd
does not change this behavior:I note also that
sayoonara
on my initial connection (in the picture above, the first allegro line) did not remove it from the list insly-list-connection
, which probably has something to do with why this is all getting so confused.Sorry to keep up with the questions. I will try to fix these issues myself.
The text was updated successfully, but these errors were encountered: