This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-04-20
Channels
- # ai (1)
- # announcements (4)
- # babashka (61)
- # babashka-sci-dev (14)
- # biff (15)
- # calva (34)
- # clj-kondo (43)
- # clj-on-windows (1)
- # clojure (123)
- # clojure-europe (31)
- # clojure-nl (1)
- # clojure-norway (8)
- # clojure-uk (4)
- # clojurescript (12)
- # code-reviews (2)
- # community-development (9)
- # core-async (3)
- # datahike (4)
- # datomic (61)
- # events (1)
- # graphql (3)
- # hyperfiddle (155)
- # introduce-yourself (1)
- # lsp (64)
- # malli (10)
- # pathom (10)
- # reagent (5)
- # reitit (6)
- # shadow-cljs (2)
- # tools-build (2)
- # vim (8)
- # xtdb (3)
Somehow I have lost these commands in Clojure(Script) files:
Just checked in a JS file, they still work there. But everything relating to code navigation is gone in clj/cljs files after I restarted my computer and probably got some VS Code upgrades.
aaaaaand it's back
Running Calva Clojure LSP: Restart the Language Server
for a third time worked, didn't the first two times.
So all good now, thanks for reading 😄
Computers, complicated stuff
clojure-lsp sometimes fails to start for me too when starting VS Code from fresh. It usually complains wildly, though.
I must have overlooked it. That's the output window of the failing Clojure Language Client:
[Trace - 08:50:43] Sending request 'initialize - (0)'.
[Error - 08:50:43] Connection to server got closed. Server will not be restarted.
[Error - 08:50:43] Server initialization failed.
Message: Pending response rejected since connection got disposed
Code: -32097
[Error - 08:50:43] Clojure Language Client client: couldn't create connection to server.
Message: Pending response rejected since connection got disposed
Code: -32097
When editing a deps.edn file in Calva, I get on "every change" an error popup :
[Error - 2:01:32 PM] Request textDocument/documentSymbol failed.
Message: Internal error
Code: -32603
[object Object]
It does not happen on clj files.
Any idea how to fix it ?It comes frm a "Clojure Language Client" its seem, is this LSP ?
I am in a "remote development" setup, so connected to a Docker container in a remote machine. Are there any known isue with this for teh Clojure LSP . I think I don't have it running
I was able to get a stack trcae :
2023-04-20T14:40:05.971Z INFO [clojure-lsp.dep-graph:269] - :maintain-dep-graph 0ms
2023-04-20T14:40:05.972Z INFO [clojure-lsp.handlers:179] - :did-open 73ms
2023-04-20T14:40:05.972Z WARN [clojure-lsp.server:401] - {:settings {}}
2023-04-20T14:40:05.972Z INFO [clojure-lsp.server:164] - :refreshing-test-tree 0ms
2023-04-20T14:40:05.973Z INFO [clojure-lsp.handlers:274] - :document-symbol 0ms
2023-04-20T14:40:05.998Z INFO [clojure-lsp.server:102] - :publish-diagnostics 0ms
2023-04-20T14:40:06.017Z INFO [clojure-lsp.db:65] - [DB] Reading transit analysis cache from /home/vscode/.cache/clojure-lsp/db.transit.json db took 225ms
2023-04-20T14:40:06.025Z INFO [clojure-lsp.feature.java-interop:271] - [Java] JDK source already present on global LSP cache dir.
2023-04-20T14:40:06.013Z ERROR [clojure-lsp.server:55] - Error receiving message: Internal error (-32603)
{:id 4, :method "textDocument/documentSymbol"}
com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine PosixPlatformThreads.java: 203
com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine PlatformThreads.java: 775
java.util.concurrent.ForkJoinWorkerThread.run ForkJoinWorkerThread.java: 183
java.util.concurrent.ForkJoinPool.runWorker ForkJoinPool.java: 1594
java.util.concurrent.ForkJoinPool.scan ForkJoinPool.java: 1656
java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec ForkJoinPool.java: 1020
java.util.concurrent.ForkJoinTask.doExec ForkJoinTask.java: 290
java.util.concurrent.CompletableFuture$AsyncSupply.exec CompletableFuture.java: 1692
java.util.concurrent.CompletableFuture$AsyncSupply.run CompletableFuture.java: 1700
promesa.util.Supplier/get util.cljc: 34
promesa.exec/wrap-bindings/fn exec.cljc: 163
clojure-lsp.server/fn/fn server.clj: 339
clojure-lsp.handlers/document-symbol handlers.clj: 278
clojure-lsp.feature.document-symbol/document-symbols document_symbol.clj: 90
clojure-lsp.feature.document-symbol/edn->element-tree document_symbol.clj: 65
clojure.core/reduce core.clj: 6886
clojure.core.protocols/fn/G protocols.clj: 13
clojure.core.protocols/fn protocols.clj: 75
clojure.core.protocols/iter-reduce protocols.clj: 49
clojure-lsp.feature.document-symbol/edn->element-tree/fn document_symbol.clj: 80
clojure-lsp.feature.document-symbol/edn->element-tree document_symbol.clj: 65
clojure.core/reduce core.clj: 6886
clojure.core.protocols/fn/G protocols.clj: 13
clojure.core.protocols/fn protocols.clj: 75
clojure.core.protocols/iter-reduce protocols.clj: 49
clojure-lsp.feature.document-symbol/edn->element-tree/fn document_symbol.clj: 80
clojure-lsp.feature.document-symbol/edn->element-tree document_symbol.clj: 65
clojure.core/reduce core.clj: 6886
clojure.core.protocols/fn/G protocols.clj: 13
clojure.core.protocols/fn protocols.clj: 75
clojure.core.protocols/iter-reduce protocols.clj: 49
clojure-lsp.feature.document-symbol/edn->element-tree/fn document_symbol.clj: 80
clojure-lsp.feature.document-symbol/edn->element-tree document_symbol.clj: 65
clojure.core/reduce core.clj: 6886
clojure.core.protocols/fn/G protocols.clj: 13
clojure.core.protocols/fn protocols.clj: 75
clojure.core.protocols/iter-reduce protocols.clj: 49
clojure-lsp.feature.document-symbol/edn->element-tree/fn document_symbol.clj: 68
clojure-lsp.feature.document-symbol/element->document-symbol document_symbol.clj: 43
clojure-lsp.feature.document-symbol/element->name document_symbol.clj: 38
clojure.core/name core.clj: 1610
java.lang.NullPointerException:
2023-04-20T14:40:06.296Z INFO [clojure-lsp.dep-graph:269] - :maintain-dep-graph 212ms
2023-04-20T14:40:06.304Z INFO [clojure-lsp.feature.java-interop:312] - [Java] JDK source analysis cache loaded successfully.
I think some deps.edn support was added to latest clojure-lsp. @UKFSJSM38 might know how we should deal with this?
I've been running into this too when I've been working with a remote session, and I end up having to restart LSP or reload the window. (After switching back to a local repl session)
There’s an issue with the latest clojure-lsp release: https://github.com/clojure-lsp/clojure-lsp/issues/1557
You can switch to the previous clojure-lsp release for now by setting calva.clojureLspVersion
to "2023.02.27-13.12.12"
, and you won’t see that error any more. Just remember to reset that setting once the problem is fixed in clojure-lsp.
Interesting... Yeah, I was editing a Calva REPL snippets config.edn
file and got this error: and it's fully of maps inside vectors... I wonder why it seemed to go away on a reload when editing a deps.edn
file? Unless I switched to a different deps.edn
file and just didn't associate the file change with the error going away? (probably!)
I think internal errors from feature X in clojure-lsp should not show popups to user, it's a feature that shows only when user opens the tree window
"tree window"?
> I think internal errors from feature X in clojure-lsp should not show popups to user, it’s a feature that shows only when user opens the tree window I think this is being done by the vscode lsp client lib. We can probably override that.
thanks! BTW made a commit in clojure-lsp fixing the symbol issue in the tree which should fix most cases, available at nightly in a few mins

There’s an issue with the latest clojure-lsp release: https://github.com/clojure-lsp/clojure-lsp/issues/1557
You can switch to the previous clojure-lsp release for now by setting calva.clojureLspVersion
to "2023.02.27-13.12.12"
, and you won’t see that error any more. Just remember to reset that setting once the problem is fixed in clojure-lsp.
I'm getting repeated popups with this message
[Error - 4:10:17 PM] Request textDocument/documentSymbol failed.
Message: Internal error
Code: -32603
[object Object]
[Error - 4:11:19 PM] Request textDocument/documentSymbol failed.
Message: Internal error
Code: -32603
[object Object]
[Error - 4:11:20 PM] Request textDocument/documentSymbol failed.
Message: Internal error
Code: -32603
[object Object]
[Error - 4:11:22 PM] Request textDocument/documentSymbol failed.
Message: Internal error
Code: -32603
[object Object]
when editing a shadow-cljs.edn
file.I see this might be related to above issue
I think we can override the lsp client lib Calva uses to not show popups for error messages. In this case I don’t think they effect the Calva experience, and even when they do, popups are a poor choice for communication, I think... These are related to a new clojure-lsp feature.
I agree that popups are not exactly ideal here. But I would hate to instead have errors just getting swallowed indiscriminately, without a conscious per-error decision by the Calva Team. In lieu of a better suggestion, I can at least think of a minor tweak that would improve the experience significantly: Simply attach a "Clojure LSP" label to these LSP errors. This would make the error feel a lot less cryptic and give some sense of scope, instead of spamming a message that has no more meaning to the average user than just "something is broken."
Well in this case there isn’t even anything broken with Calva (IIUC) - the errors are related to a new lsp feature that doesn’t involve Calva (at this point, at least). Tagging them as coming from clojure-lsp doesn’t make them any less spammy and annoying. I think I’d rather that if something were broken, in the process of debugging we have the user check the server<->client logs instead.
@U90R0EPHA If you don’t mind, comment further on the related GH issue, so we can have the discussion isolated there, and so we don’t spam @U03QBKTVA0N’s thread 😃