chlorine-clover

mauricio.szabo 2021-12-29T04:47:46.014200Z

Did you update vscode recently?

mauricio.szabo 2021-12-29T04:57:01.016700Z

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

mauricio.szabo 2021-12-29T04:58:07.018400Z

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

mauricio.szabo 2021-12-29T05:09:50.020500Z

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

seancorfield 2021-12-29T06:34:20.022100Z

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).

seancorfield 2021-12-29T06:35:19.022400Z

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

pez 2021-12-29T07:37:52.023200Z

I'll have a look.

pez 2021-12-29T09:46:19.025Z

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: java.io.FileNotFoundException: 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: java.io.FileNotFoundException: Could not locate clojure/spec/alpha__init.class, clojure/spec/alpha.clj or clojure/spec/alpha.cljc on classpath.

seancorfield 2021-12-29T16:59:10.031Z

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}"

pez 2021-12-29T18:07:12.032500Z

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

seancorfield 2021-12-29T18:08:20.033200Z

"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 https://clojure.org/reference/deps_and_cli

seancorfield 2021-12-29T18:08:29.033400Z

Also:

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

pez 2021-12-29T18:50:34.042500Z

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

pez 2021-12-29T09:53:11.025900Z

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

pez 2021-12-29T10:15:34.026900Z

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

pez 2021-12-29T10:20:53.029500Z

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. 😃

seancorfield 2021-12-29T17:00:03.031300Z

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
V8: 9.1.269.39-electron.0
OS: Darwin x64 16.7.0

pez 2021-12-29T10:29:42.030100Z

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

seancorfield 2021-12-29T16:57:42.030900Z

@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.

mauricio.szabo 2021-12-30T14:37:51.042900Z

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

➕ 1
pez 2021-12-30T14:40:04.043200Z

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.

pez 2021-12-29T18:08:05.033Z

I could eval top block.

seancorfield 2021-12-29T18:09:57.033600Z

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?

seancorfield 2021-12-29T18:10:14.033800Z

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

pez 2021-12-29T18:11:33.034700Z

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

seancorfield 2021-12-29T18:12:23.034900Z

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?

pez 2021-12-29T18:15:01.036600Z

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.

seancorfield 2021-12-29T18:16:25.036800Z

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

seancorfield 2021-12-29T18:39:41.037Z

Argh! And now it is all magically working again!

pez 2021-12-29T18:40:34.038Z

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

seancorfield 2021-12-29T18:41:04.038200Z

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 😐

seancorfield 2021-12-29T18:41:34.038400Z

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

pez 2021-12-29T18:49:23.041500Z

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...

seancorfield 2021-12-29T19:09:35.042700Z

Definitely very weird...

seancorfield 2021-12-29T18:42:30.039100Z

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