Fork me on GitHub

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


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*


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.


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.


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


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


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


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