Fork me on GitHub
#calva
<
2022-06-04
>
pinkfrog06:06:30

Sounds like the latest release of Calva has a regression. Jump to definition no longer works.

1
pez07:06:20

Could it be that clojure-lsp is not starting correctly? That was the thing we changed. Or rather, the download.

Ferdinand Beyer08:06:34

Yep, same here. clojure-lsp is not starting

Ferdinand Beyer08:06:06

Trying to start it manually has no effect either

Ferdinand Beyer08:06:53

Downgrading to 2.0.280 works for me

pez08:06:43

Can you see what you get in the console if you stop clojure-lsp and use the download command?

pez08:06:57

Also, what machines are you on?

Ferdinand Beyer08:06:12

I’m using an M1 mac

pez08:06:47

Are you using Apple or Intel Code binary?

Ferdinand Beyer08:06:08

You mean of VS Code?

pez08:06:39

Yes. Activity Monitor tells you.

Ferdinand Beyer08:06:58

Sorry, can you please point me to the console you meant?

pez08:06:21

Can you try with an Intel one? I think I tested this version using that, but I am afk right now.

pez08:06:57

Help menu, Toggle Developer Tools.

Ferdinand Beyer08:06:52

path is undefined, does this ring a bell?

Ferdinand Beyer08:06:04

Path to clojure-lsp probably?

Ferdinand Beyer08:06:48

Intel: Cannot try right now, I figure getting an intel version of VS Code is not trivial and I’m in the middle of something. But I can check later if that helps

pez09:06:32

It's trivial, but disruptive of current work. Trivial in that https://code.visualstudio.com/Download offers you both binaries. Disruptive in that you can't run them side by side. What I do is that I run Insiders and regular code side by side. https://code.visualstudio.com/insiders/

pez09:06:30

I'm at the computer now. Will try to fix this quickly. Failing that we'll have to roll back the change for now.

pez09:06:13

When I try this with an Apple Silicon version of VS Code, it downloads the clojure-lsp standalone jar. Which is not good, I think, but anyway, it doesn't croak, like it does for you there, @ferdinand. Hmmm.

Ferdinand Beyer09:06:59

Let me know if there is anything else I can check?

pez10:06:57

If you can paste the full console output, that would be awesomee.

pez10:06:43

Thanks! It doesn't look like the full output though. Just the crash. I want to know what happens before and after. 😃

Ferdinand Beyer10:06:49

Hm. I cleared the console, then ran Jack-in, then started clojure-lsp

Ferdinand Beyer10:06:14

Downloading works fine:

Ferdinand Beyer10:06:32

Right after this, when I start clojure-lsp, I get:

[Extension Host] Error getting ns form of this file using docMirror, trying with cljs.reader: Error: Missing mirror document!
workbench.desktop.main.js:71 [Extension Host] Error parsing ns form of this file. #error {:message "resolve-symbol is not implemented", :data {:type :reader-exception, :sym start}, :cause #error {:message "resolve-symbol is not implemented", :data {:sym start}}}
workbench.desktop.main.js:71 [Extension Host] Error getting ns form of this file using docMirror, trying with cljs.reader: Error: Missing mirror document!
workbench.desktop.main.js:71 [Extension Host] Error parsing ns form of this file. #error {:message "resolve-symbol is not implemented", :data {:type :reader-exception, :sym start}, :cause #error {:message "resolve-symbol is not implemented", :data {:sym start}}}
workbench.desktop.main.js:71 [Extension Host] Error getting ns form of this file using docMirror, trying with cljs.reader: Error: Missing mirror document!
workbench.desktop.main.js:71 [Extension Host] Error parsing ns form of this file. #error {:message "resolve-symbol is not implemented", :data {:type :reader-exception, :sym start}, :cause #error {:message "resolve-symbol is not implemented", :data {:sym start}}}
workbench.desktop.main.js:594   ERR Missing mirror document!: Error: Missing mirror document!
	at Object.g [as getDocument] (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:386020)
	at Object.o [as getFormSelection] (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:535463)
	at a (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:551266)
	at c (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:551387)
	at Object.e.currentContext (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:552633)
	at /Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:518529
	at Generator.next (<anonymous>)
	at i (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:517285)
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)
workbench.desktop.main.js:71 [Extension Host] rejected promise not handled within 1 second: TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received undefined
E @ workbench.desktop.main.js:71
$logExtensionHostMessage @ workbench.desktop.main.js:1719
_doInvokeHandler @ workbench.desktop.main.js:1719
_invokeHandler @ workbench.desktop.main.js:1719
_receiveRequest @ workbench.desktop.main.js:1719
_receiveOneMessage @ workbench.desktop.main.js:1719
(anonymous) @ workbench.desktop.main.js:1719
invoke @ workbench.desktop.main.js:67
deliver @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:83
_receiveMessage @ workbench.desktop.main.js:83
(anonymous) @ workbench.desktop.main.js:83
invoke @ workbench.desktop.main.js:67
deliver @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:67
acceptChunk @ workbench.desktop.main.js:83
(anonymous) @ workbench.desktop.main.js:83
O @ workbench.desktop.main.js:3170
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
workbench.desktop.main.js:71 [Extension Host] stack trace: TypeError: The "path" argument must be of type string. Received undefined	at new NodeError (node:internal/errors:371:5)	at validateString (node:internal/validators:119:11)	at Object.join (node:path:1172:7)	at /Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:434903	at /Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:436531	at Generator.next (<anonymous>)	at /Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:430716	at new Promise (<anonymous>)	at l (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:430461)	at I (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:434663)	at /Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:433956	at Generator.next (<anonymous>)	at i (/Users/fbeyer/.vscode/extensions/betterthantomorrow.calva-2.0.281/out/extension.js:2:430518)	at runMicrotasks (<anonymous>)	at processTicksAndRejections (node:internal/process/task_queues:96:5)
E @ workbench.desktop.main.js:71
$logExtensionHostMessage @ workbench.desktop.main.js:1719
_doInvokeHandler @ workbench.desktop.main.js:1719
_invokeHandler @ workbench.desktop.main.js:1719
_receiveRequest @ workbench.desktop.main.js:1719
_receiveOneMessage @ workbench.desktop.main.js:1719
(anonymous) @ workbench.desktop.main.js:1719
invoke @ workbench.desktop.main.js:67
deliver @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:83
_receiveMessage @ workbench.desktop.main.js:83
(anonymous) @ workbench.desktop.main.js:83
invoke @ workbench.desktop.main.js:67
deliver @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:67
acceptChunk @ workbench.desktop.main.js:83
(anonymous) @ workbench.desktop.main.js:83
O @ workbench.desktop.main.js:3170
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
workbench.desktop.main.js:2670 [[object Object]]The "path" argument must be of type string. Received undefined
$onExtensionRuntimeError @ workbench.desktop.main.js:2670
_doInvokeHandler @ workbench.desktop.main.js:1719
_invokeHandler @ workbench.desktop.main.js:1719
_receiveRequest @ workbench.desktop.main.js:1719
_receiveOneMessage @ workbench.desktop.main.js:1719
(anonymous) @ workbench.desktop.main.js:1719
invoke @ workbench.desktop.main.js:67
deliver @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:83
_receiveMessage @ workbench.desktop.main.js:83
(anonymous) @ workbench.desktop.main.js:83
invoke @ workbench.desktop.main.js:67
deliver @ workbench.desktop.main.js:67
fire @ workbench.desktop.main.js:67
acceptChunk @ workbench.desktop.main.js:83
(anonymous) @ workbench.desktop.main.js:83
O @ workbench.desktop.main.js:3170
emit @ node:events:390
addChunk @ node:internal/streams/readable:315
readableAddChunk @ node:internal/streams/readable:289
Readable.push @ node:internal/streams/readable:228
onStreamRead @ node:internal/stream_base_commons:199
workbench.desktop.main.js:2670 TypeError: The "path" argument must be of type string. Received undefined
	at new NodeError (node:internal/errors:371:5)
	at validateString (node:internal/validators:119:11)
	at Object.join (node:path:1172:7)
	at 
	at 
	at Generator.next (<anonymous>)
	at 
	at new Promise (<anonymous>)
	at l ()
	at I ()
	at 
	at Generator.next (<anonymous>)
	at i ()
	at runMicrotasks (<anonymous>)
	at processTicksAndRejections (node:internal/process/task_queues:96:5)

Ferdinand Beyer10:06:10

Is that helpful?

Ferdinand Beyer10:06:08

This is the same output just in a different order though. If you want we can also jump on a call

pez10:06:06

Oh, that would be awesome. I'll open a huddle in the channel,

alpox10:06:46

Clojure-Lsp works for me on an Intel-Windows in WSL (Just if it helps somehow)

🙏 1
alpox11:06:02

Could you locate the error? I just took a peek and found that the error seems to originate from process.env.JAVA_HOME not being defined.

pez11:06:35

Thanks for the huddle session, @ferdinand. Very cool that we found the problem. New Calva being released now.

👍 4
gratitude-thank-you 3
pez11:06:07

You are amazing @U6JS7B99S. It took us a while, but yes, it was JAVA_HOME not being set on @ferdinand's machine. I'm not fixing that with the new version, because that is an old bug that we just happened to uncover.

Ferdinand Beyer11:06:55

Thanks @U0ETXRFEW for being incredibly responsive, taking the time and fixing this on a weekend!

🙏 1
alpox11:06:11

:thumbsup: I'm hoping for an M1-Release of clojure-lsp especially as my M1 will arrive next week

alpox11:06:42

That shouldn't be an issue though as long as rosetta does a good job - but I have no experience there 😄

pez11:06:49

Right now we don't check for any Apple Silicon version of clojure-lsp. So when that arrives we'll need to update the download code. (Or fix the check and be prepared for when clojure-lsp adds a native binary.)

calva 1
Ferdinand Beyer11:06:47

I did not even know that clojure-lsp was emulated, never felt slow to me 🙂

pez11:06:54

I switched to M1 VS Code today (because hunting this bug) and it is much snappier. So we should expect better performance from a native lsp binary as well, I think.

alpox11:06:08

@ferdinand Good to know! So I guess this is nothing to worry about then 😉

Ferdinand Beyer11:06:35

Exactly, no worries 🙂

pez11:06:40

What was really slow, though, was v2.0.281 of Calva using the clojure-lsp jar. 😃

🙈 1
Ferdinand Beyer11:06:15

So maybe it’s good I don’t have that JAVA_HOME var set

pez11:06:43

It's happening:

🚀 2
pez11:06:27

It was good in that we found the bug. We should fix it. At least a proper error message.

alpox11:06:28

Looks like clojure-lsp is still waiting for github to provide m1 runners. https://github.com/clojure-lsp/clojure-lsp/issues/986 I guess that could take a while

pinkfrog12:06:57

Thanks guys. Problem gone with the latest release.

metal 1
🙏 1
zakkor09:06:25

Is there any way to make errors when evaluating entire files not print the stacktrace by default (in case there is an error)? When there is an error when evaluating something via alt+enter, the stack trace is not printed and there's a button "Print stacktrace". I'd like to get that same functionality for evaluating files too First image: how it currently works Second image: how I would like it to work

pez16:06:58

There is no way to configure it. But there's probably a way we could make it work like that.

pez11:06:35

Thanks for the huddle session, @ferdinand. Very cool that we found the problem. New Calva being released now.

👍 4
gratitude-thank-you 3
pez11:06:37

Dear Calva friends. A fix for the M1 lsp start bug just released: https://github.com/BetterThanTomorrow/calva/releases/tag/v2.0.282 (could take a few minutes for VS Code to realize it is released). • Fix: https://github.com/BetterThanTomorrow/calva/pull/1761 It hit you if you where using an Apple Silicon build of VS Code and did not have JAVA_HOME env variable set. Big thanks to @ferdinand for helping me debug this. 🙏 gratitude ❤️ He now also knows how easy it is to get the Calva development environment up and running. 😄

😎 1
Noah Bogart17:06:52

I implemented automatically downloading/setting up clojure-lsp in my coc.nvim extension using calva’s code! Thank you so much to everyone who works on calva, I couldn’t have figured it out otherwise (at least not without great effort and many mistakes hah)

🎉 5