Fork me on GitHub

Did you update vscode recently?


As for debugging, you can try to compile Clover manually and then see if you can find where it's crashing. It's almost the same as Chlorine, with the exception that there's no submodules to be cloned


You just need to watch for both targets, because the webview (console tab) is a different target because of vscode limitations.


(BTW, sound that the problem may be some dependency that monkey-patches node core libs...)


The weird thing is that it had been working just fine for ages, until I had to restart VS Code. So maybe an update in VS Code caused this? But neither Clover nor Calva have been updated particularly recently (and installing older versions of both doesn't help).


I'm on VS Code 1.63.2 if that helps. (1.63.2 not 1.68.2)


I'll have a look.


I fail at trying to start a socket repl. Never done that before, I realize. I have googled and created this command line:

java -jar /Users/pez/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}" clojure.main
It crashes with this clue
Caused by: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath.
If I try with 1.10.3 it fails with this error message:
Caused by: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath.


You haven't been able to start Clojure using just the one JAR since 1.8. You need to use the CLI:

clj -J-Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}"


Ah, -J. Could be added to the official Clojure CLI docs.


"JVM arguments may either be passed on the command line (with -J) or by using data stored in an alias under :jvm-opts and passed with -X or -A or -M" from



 -Jopt          Pass opt through in java_opts, ex: -J-Xmx512m
from clojure --help


I somehow missed that. Read it, and only picked up the :jvm-opts. 😀


Including the project dir in the classpath gives me the same spec alpha missing error

java -cp /Users/pez/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:. -Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}" clojure.main


I could add the java opts to the deps.edn and then connect Clover.


I can evaluate code and such, what does “most any Clover action” mean, @seancorfield? Can you give an example repro that does not require any Clover setting up? (Well, if setting up is required, than I’ll do it, of course, just that I don’t have any.) I’m using VS Code 1.63.2, btw, assuming 1.68.2 is a typo. 😃


Oops, yeah:

Version: 1.63.2
Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
Date: 2021-12-15T09:37:28.172Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
OS: Darwin x64 16.7.0


I do get the font issue. With and without Calva enabled.


@pez Clover out-of-the-box, eval-top-block does not work. load-file seems to be the only command that works. To clarify: eval-top-block works without Calva. As soon as I enable Calva, that command throws the exceptions I pasted from the webview dev tools.


I could eval top block.


So you have VS Code + Calva (default setup) + Clover (default setup) and you can connect to a socket REPL and load-file and then eval-top-block and eval-block work?


So maybe something has gotten corrupted in my VS Code setup?


Maybe. All I could reproduce was the font error. So the output looks a bit funny.


I tried installing different versions of Clover and Calva hoping that would "fix" anything that might be broken in the original installs. But Clover works fine if I have Calva disabled. As soon as I enable Calva, Clover breaks. Any suggestions for debugging what Calva might be doing to cause this?


Not really. To my knowledge that sounds impossible. =) But corrupted VS Code installs is not unheard of. See if it works if you install VS Code Insiders.


Yeah, I guess I could blow away VS Code and install from scratch at this point...


Argh! And now it is all magically working again!


Hmm, that's not good. Happy for you of course, but a bit worrying...


I think it must have been something corrupted locally, because I fired up VS Code on another machine to test and it worked there, even when I re-enabled all my extensions. And then I restarted VS Code on my Mac and after it sync'd settings from the Windows laptop, everything was re-enabled and working 😐


So... a corrupted VS Code setup, that uncorrupted itself after sync'ing from another machine. Sigh.


Oh, well. Let's hope it stays working. I'm quite curious about how Calva and Clover got to conflict, but if something is corrupt, maybe anything can happen...


Definitely very weird...


VSCode have a very, VERY high number of lines of code. I'm amazed these kinds of problems don't happen more often 😄


So am I. Though it does happen now and then. I’ve spent a lot of time helping people chase heisenbugs that in the end “just” needed a re-install of VS Code.


My problem magically fixed itself after I forced a sync of extensions and settings with VS Code on another machine.