Fork me on GitHub
#lsp
<
2022-06-15
>
lassemaatta05:06:35

are there any known issues with clojure-lsp "freezing" when adding new files?

lassemaatta05:06:49

for example (in emacs): 1. I use treemacs to add some foobar.cljs file to my project somewhere 2. I open the file and see the contents are (ns some.package.foobar) (not sure what adds this default content) 3. I add some :require's and do something, which requires communication with clojure-lsp, e.g. try to complete (def foo (str/joi<tab> 4. Emacs freezes 5. After perhaps 10 seconds emacs unfreezes and I see completion--some: Timeout while waiting for response. Method: textDocument/completion in *Messages*

lassemaatta05:06:44

Nothing particularly interesting happens in the clojure-lsp logs at the same time:

2022-06-15T04:58:35.040Z  INFO [clojure-lsp.handlers:428] - :resolve-code-lens 55ms
2022-06-15T04:58:46.566Z  WARN [clojure-lsp.kondo:276] - Non-fatal error from clj-kondo: No configs copied.

2022-06-15T04:58:46.567Z  INFO [clojure-lsp.handlers:124] - :did-open 140ms
2022-06-15T04:58:46.567Z  INFO [clojure-lsp.server:104] - :refreshing-test-tree 0ms
2022-06-15T04:58:46.567Z  INFO [clojure-lsp.handlers:422] - :code-lens 0ms
2022-06-15T04:58:46.812Z  WARN [clojure-lsp.kondo:276] - Non-fatal error from clj-kondo: No configs copied.

2022-06-15T04:58:46.812Z  INFO [clojure-lsp.handlers:124] - :did-open 246ms
2022-06-15T04:58:46.813Z  INFO [clojure-lsp.server:104] - :refreshing-test-tree 0ms
2022-06-15T04:58:46.813Z  INFO [clojure-lsp.handlers:146] - :did-close 0ms
2022-06-15T04:58:46.814Z  INFO [clojure-lsp.handlers:422] - :code-lens 0ms
2022-06-15T04:58:46.969Z  WARN [clojure-lsp.kondo:276] - Non-fatal error from clj-kondo: No configs copied.

lassemaatta05:06:14

afterwards the clojure-lsp process is still running, but the communication between emacs and clojure-lsp doesn't seem to work. And nothing appears in the clojure-lsp logs.

lassemaatta05:06:51

Running lsp-workspace-restart fixes the issue; the old clojure-lsp process dies and a new one is spawned.

lassemaatta08:06:52

I can try if I could create a minimal repro of this

ericdallo13:06:27

Please do, This timeout should hot happen and I'm not aware of any freeze expected

ericdallo13:06:44

Also, try to repro with the nightly build first on #clojure-lsp-builds