-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
REPL stuck and requires window reload occasionally #1189
Comments
Thanks for reporting. Does this happen only with a certain project? That error makes it look like there could be an issue with Calva finding the project root. It's pointing here: calva/src/results-output/results-doc.ts Line 45 in 210e816
If you create a new project with |
I see this on most of my work projects - I don't think they're doing anything particularly unusual - I can share an example
and here's a file tree with temporary files/cache omitted and classnames removed:
|
Hmm, I don't see anything that stands out as problematic there. Please check if you have this issue with a
|
I see this (and have always seen this) on all my deps, lein and shadow projects under Ubuntu linux. It seems to happen if the project has been open for a while without having been jacked-in. Reloading/restarting VSCode also fixes it for me (if I jack-in relatively quickly). |
I also believe this is related to how long the project is open without jacking in, as I tend to notice it when coming back to projects - I can't recall loading a new project and having this issue. I'll leave a new lein project over the weekend without jacking in and try it then. |
I'll do the same on a deps project! :) |
FWIW - I couldn't make it fail on vanilla deps/lein projects, so there is something else going on here. |
I experience this almost daily, and have the same OS + app versions |
I wonder if this is specific to Mac OS... if anyone has this issue in another OS please comment. |
As a workaround for now, you may want to start your repl in a separate terminal and connect to it. For a given project, you can copy the jack-in command by using the Calva command |
Ubuntu here |
Oops, sorry, I missed that above. |
I have the same problem when using code-server (didn't try on VSCode itself). |
Since this doesn't happen on our systems, it's hard to debug. If anyone having the issue wants to run Calva in dev mode while they work, then when they have the problem set a breakpoint in the jack-in code and step through the code, that could help find the issue. See here for how to run Calva in dev mode: https://github.com/BetterThanTomorrow/calva/wiki/How-to-Hack-on-Calva. It's pretty simple and you can just do all your normal work in the extension host. Here's a good place to start debugging: Line 236 in 35f1490
|
I am facing the exact same issue! In my case I am trying to connect to an already running repl. It hangs when I try to connect but does show normal Looks like it's working only after I see the I have been facing this issue for more than 4 months now. I am running vscode on |
@punit-naik have you tried if it is enough with just reloading the window (Command Palette -> Developer: Reload Window)? Thinking it might tell us something if it really is a full VS Code restart that is needed. (No idea what it tells us, but anyway.) |
Yes, it does work if I just do |
So, I often have ten or more REPL servers running from my vscode terminals, but always in different windows. Are you having several servers running from the same window? |
Yes, I have multiple REPLs running in the same window. But it used to work
just fine, 4 months back though.
…On Wed, 16 Jun 2021, 3:36 am Peter Strömberg, ***@***.***> wrote:
So, I often have ten or more REPL servers running from my vscode
terminals, but always in different windows. Are you having several servers
running from the same window?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1189 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABWILEIX6C5WGVWP73TYUV3TS7FGHANCNFSM454XBILA>
.
|
Probably something changed in VS Code. We should check their issue tracker. Very good with these hints you are providing! Meanwhile: If generally you are connecting rather than jacking in, as a workaround you could start your REPLs in a terminal outside VS Code. It has the benefit that reloading the VS Code window will not kill the REPLs. |
In February this was added to the terminal feature of VS Code: https://code.visualstudio.com/updates/v1_54#_retain-terminal-processes-on-window-reload Correlation is not causation, I know, but... |
This PR was released a little over 3 months ago: #1053. I doubt this is an issue though, but since it was a lot of refactoring (though simple replacements, really) involving state, I thought I'd mention it here. |
@punit-naik You can try see if #1053 has to do with this issue (I doubt it) by installing Calva Also to see if it could be the terminal reconnection feature, try with VS Code 1.53. I think this is much more likely, so I would start with this one. |
I was having this issue as well... I thought I would try switching to vscode and calva. Leiningen projects work fine but as far as I could tell I could never get a deps.edn project to connect. The terminal ouptup showed nrepl starting:
But the calva output window would display nothing after "Happy Coding"
I would try to type a command and nothing. I then found this issue and tried the Reload Window trick and that worked. Now I can't seem to reproduce it... and didn't think to check the console first. If I see the issue again I will try to gather more info... but here is my vscode version info
Not sure how to get calva extension version but the changelog tab shows the following
I was trying to follow this xtdb tutorial when I encountered the issue and the entirety of my project consisted only of this deps.edn file copied from the tutorial. So pretty sure the issue isn't related to project structure.
|
OK, I was able to get a bit more information running instance of vs code from calva project. A bit before I did try to clean my project a bit before deleting the .lsp and other folders with git clean -xdf and wondered maybe if it might be waiting on Clojure LSP before starting, but after closing and reopening the project I was able to get a repl started while Clojure LSP was still initializing, but then after reloading the project again a bit later I noticed the fsPath issue in console and was not able to start a repl. I'm still not certain what series of steps is necessary to reproduce the issue, but here is the stack trace for the fsPath error... I also wonder if this error might be due to Clojure LSP indexing work in background and maybe the promise rejection is what sets up the bad state... (just a theory) ... and |
It seems that when you get that error, calva/src/results-output/results-doc.ts Line 46 in 29c6da4
Maybe if you continue to use Calva using the development build, you can troubleshoot why that is occurring. If you do happen to find steps to consistently reproduce the issue, please post them here. Thanks for your troubleshooting, @kurtharriger! |
Can you share your project, @kurtharriger ? |
The project I've been primarily working on is here: https://github.com/kurtharriger/logseq-things3-query-proxy The issue isn't entirely consistent but does seem to happen to me several times a day, often does happen when switching from one project to another. I've just sorta gotten into the habit that if repl doesn't start to reload the window and try again. |
This looks like the same issue I found in #1509 . calva/src/results-output/results-doc.ts Lines 283 to 284 in c46b011
|
This should be fixed via #1510. |
Hello, thanks again for a wonderful tool.
For a while I've had the intermittent (but basically daily) issue that when I try to jack-in to a Clojure REPL Calva will hang at this step in the repl output window:
The session never hooks up and I can never interact. The status bar shows
nREPL cljc/clj
as normal, and attempting to jack in again does nothing to fix it.To resolve this I have to reload the VSCode window
I can see this stacktrace pertaining to Calva in the VSCode devtools but I don't know if it's related:
Versions
Mac OS: Big Sur 11.2.3
VSCode:
Calva:
The text was updated successfully, but these errors were encountered: