Fork me on GitHub
#calva
<
2023-05-30
>
dvorme21:05:21

In VSCode/Linux, I'm getting 'Cannot run program "boot" ... no such file or directory' when Calva starts. If I run "boot show --fake-classpath" from the terminal in VSCode, it runs correctly. Any ideas how to troubleshoot this?

pez22:05:02

How is Calva configured to run boot?

dvorme20:05:33

When VSCode opens a Clojure project, Calva runs boot if there's a build.boot. I have no idea how it does it. I've been through all of the Calva settings and can't find a path or anything. I launched code via a bash shell and all the things are already on the path anyway.

dvorme20:05:06

Maybe I can boot dev and jack in. I wonder if Calva would do the right thing then...?

pez20:05:31

I had no idea Calva did that. Are you sure it isn’t something else that does it? Some other Clojure extension, maybe?

dvorme20:05:33

And oddly:

pez20:05:06

Thanks. That’s actually clojure-lsp, though by proxy of Calva.

pez20:05:18

What’s the exit code after running that command?

dvorme20:05:19

It works from the shell.

pez20:05:35

Yeah, but you get some errors when it’s run in VS Code. Was thinking it could fool clojure-lsp…. Could it be different java versions in the shell outside VS Code and the terminal inside it?

pez20:05:24

That looks fine.

dvorme20:05:30

Maybe boot does something funky with Java versions... Let me check.

dvorme20:05:17

Unless the Java LSP server will automagically download a JRE, I don't see how it's possible to have more than one Java.

dvorme20:05:59

I'm on a Steam Deck and the only place I can install anything is under $HOME or via Flatpak.

dvorme20:05:35

So both Java and code are manually installed. code is under ~/bin and OpenJDK 11 by Scala's coursier tool and accessed via PATH.

dvorme20:05:03

Well, both are available on the PATH.

dvorme20:05:11

From the CLI

dvorme20:05:20

Same paths inside and outside code, which makes sense since I launched code from bash.

pez20:05:03

Launching code from bash is otherwise what I advice people to do in situations like this. 😃

pez20:05:31

It is funny though that you get those warnings inside vscode, but not outside.

dvorme20:05:29

If I boot dev, then jack-in, should Calva find all the classpath things?

pez20:05:35

Cool that you run Calva on a Steam Deck. I’ll have to borrow my son’s device and try that.

dvorme20:05:13

It's a shockingly decent development platform--especially hooked up to an external display+keyboard+mouse.

dvorme20:05:44

One just has to be aware that there's no swap by default, so if you run out of RAM, you crash.

dvorme20:05:00

I'm looking at you, Chrome...

pez20:05:09

Jack-in is a bit of a funny name, which I regret using a bit. But if you start the REPL with boot, and make sure you have nrepl and cider-nrepl running there with the versions that Calva want, then you can connect the Calva to the REPL and things should work fine.

dvorme20:05:50

Where do I find the current nrepl/cider-nrepl preferred versions?

dvorme20:05:47

The web site, I guess?

pez20:05:50

Calva prints them in the Calva says output channel at start.

pez20:05:30

Unless we find a solution for that lsp classpath problem you won’t have all the nice clojure-lsp things, but Calva compensates pretty nicely with what the REPL offers.

dvorme20:05:14

> Unless we find a solution for that lsp classpath problem you won’t have all the nice clojure-lsp things Any ideas for how to troubleshoot this? Might Joyride help?

pez21:05:46

Joyride is nice, but can’t help here. Might be that someone has filed an issue on clojure-lsp about it. Though it might be very specific to your setup, and I don’t think Boot is ask that common these days.

dvorme22:05:05

Thanks much!

🙏 2