Fork me on GitHub
Jakub Holý (HolyJak)17:06:39

Sometimes Calva does not autocomplete and command-click to navigate to required namespaces does not work either. I have jacked-in (via shadow-cljs, and am running the app in a browser). Why? How to troubleshoot and fix? 🙏


@U0ETXRFEW Do you know off hand if these features are provided by the repl or clojure-lsp?

Tomas Brejla18:06:53

I am recently running into similar behavior even on simple deps.edn project where I'm playing with spec. When this happens, restarting lsp server seems to help.

Tomas Brejla18:06:35

It'd be nice to find the cause of that though.


Indeed, if a clojure-lsp restart fixes the issue, it’s likely related to the above ^.

Charlie Briggs19:06:26

I've started seeing some weird Calva behaviour recently - it seems to be hanging on Saving 'schema.clj': Getting code actions from ''Calva: Clojure & ClojureScript Interactive Programming' whenever changing anything, and makes editing pretty unusable. I've also seen it across two machines on the same project

Charlie Briggs19:06:30

I can see these kind of things in the logs

2022-06-28 19:58:20.204] [renderer1] [error] [Extension Host] Error writing to results doc: Error: Expected there to be a project root!
    at Object.assertIsDefined (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/utilities.ts:37:11)
    at outputFileDir (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:45:8)
    at DOC_URI (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:56:30)
    at editor (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:295:18)
    at (<anonymous>)
    at editor (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/repl-history.ts:141:60)
    at new Promise (<anonymous>)
    at onAppended (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/repl-history.ts:141:60)
    at writeToResultsDoc (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:294:42)
    at editor (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:346:9)
    at (<anonymous>)
    at editor (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/repl-history.ts:141:60)
    at new Promise (<anonymous>)
    at writeNextOutputBatch (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/repl-history.ts:141:60)
    at writeNextOutputBatch (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:334:16)
    at editor (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:358:13)
    at (<anonymous>)
    at editor (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/repl-history.ts:141:60)
    at new Promise (<anonymous>)
    at t (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/repl-history.ts:141:60)
    at flushOutput (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:351:1)
    at append (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:370:8)
    at Object.appendPrompt (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/results-output/results-doc.ts:432:3)
    at printWarningForError (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/extension.ts:55:20)
    at (<anonymous>)
    at i (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/src/evaluate.ts:337:11)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
[2022-06-28 19:58:30.127] [renderer1] [error] Header must provide a Content-Length property.: Error: Header must provide a Content-Length property.
    at p.onData (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/node_modules/vscode-jsonrpc/lib/common/messageReader.js:138:27)
    at Socket.<anonymous> (/home/charlie_briggs/.vscode-server/extensions/betterthantomorrow.calva-2.0.287/node_modules/vscode-jsonrpc/lib/common/messageReader.js:122:18)
    at Socket.emit (node:events:390:28)
    at addChunk (node:internal/streams/readable:315:12)
    at readableAddChunk (node:internal/streams/readable:289:9)
    at Socket.Readable.push (node:internal/streams/readable:228:10)
    at Pipe.onStreamRead (node:internal/stream_base_commons:199:23)
Any ideas? It's a new project (lein) but the config isn't anything special.

Charlie Briggs19:06:08

I can try an older, known to be good, project tomorrow and see if I see the same thing


@U7L6VDLTZ does restarting clojure-lsp help? If so, this might be related to

Charlie Briggs08:06:06

yes it did, likely the same issue. I'll try rolling back


Out of curiosity, whatever happened to the multicursor paredit effort? I remember hearing a bunch about it a while ago, but nothing recently


I’m not sure if much has happened around it lately, but the PR is here:


Four times today, I’ve had VSCode complete freeze up and require me to close the window and relaunch. So far it appears to happen at some point shortly after making an edit to a large file. I’m not connected to a repl, just editing. It doesn’t happen on every edit, so I can’t nail down exactly the steps to trigger it. At this point I’m wondering if anyone experiences this as well.

🙋 1
Tuomas-Matti Soikkeli07:06:39

I’ve been experiencing random freezing as well.


The issue some Calva users experienced with clojure-lsp regarding it not responding has been fixed in 2022.06.29-19.32.13 (released yesterday). You can reload your window to get the latest version (or run the commands to stop it, download it, and start it). If you keep having the freezing issue, it could be something else. In that case, please create an issue with steps to reproduce, if you can.


I do still experience freezing.

clojure-lsp version used: 2022.06.29-19.32.13
clj-kondo version used: 2022.06.22
I’ll work on finding a way to reproduce the problem.

👍 1