Fork me on GitHub
#chlorine-clover
<
2021-12-29
>
mauricio.szabo04:12:46

Did you update vscode recently?

mauricio.szabo04:12:01

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.szabo04:12:07

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

mauricio.szabo05:12:50

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

seancorfield06:12:20

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

seancorfield06:12:19

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

pez07:12:52

I'll have a look.

pez09:12:19

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.

seancorfield16:12:10

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

pez18:12:12

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

seancorfield18:12:20

"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

seancorfield18:12:29

Also:

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

pez18:12:34

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

pez09:12:11

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

pez10:12:34

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

pez10:12:53

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

seancorfield17:12:03

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

pez10:12:42

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

seancorfield16:12:42

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

pez18:12:05

I could eval top block.

seancorfield18:12:57

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?

seancorfield18:12:14

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

pez18:12:33

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

seancorfield18:12:23

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?

pez18:12:01

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.

seancorfield18:12:25

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

seancorfield18:12:41

Argh! And now it is all magically working again!

pez18:12:34

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

seancorfield18:12:04

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 😐

seancorfield18:12:34

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

pez18:12:23

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

seancorfield19:12:35

Definitely very weird...

mauricio.szabo14:12:51

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

1
pez14:12:04

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.

seancorfield18:12:30

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