Fork me on GitHub
#calva
<
2023-01-12
>
lspector17:01:00

Will Calva work correctly with a deps.edn project if the user hasn't installed the cli tools?

Alex Miller (Clojure team)17:01:54

You won’t be able to start and connect to a repl

pez17:01:31

Actschually... 😃 If you use Calva jack-in, it will work without the cli. If they are missing, Calva falls back on deps.clj, which is bundled. Java is required, however.

Alex Miller (Clojure team)18:01:01

ah, right, forgot about that!

lspector18:01:50

Awesome @U0ETXRFEW! They (students in my class that starts in a few weeks) will have Java, so it's great that they just need VSCode and then Calva and they'll be good to go! They'll probably want cli at some point, but it's great that it's not needed to start.

ericdallo18:01:40

You may face classpath lookup fail for static analysis used by clojure-lsp, repoting only basic info as under the hood clojure-lsp run clj -Spath to get the classpath (maybe we should consider add support for deps.clj as well)

pez19:01:42

@UKFSJSM38 is there a way Calva can tell clojure-lsp about the path to the bundled deps.clj?

ericdallo19:01:06

no ATM, we would need to support that via initializationOptions on clojure-lsp startup, but since this is something that would be nice to have on all editors, would be nice to support it on server side I think

pez10:01:19

Maybe it’s simplest if you bundle deps.clj and fall back like Calva does…

👍 2
lspector14:02:36

Some of my students are getting errors trying to jack in to minimal deps.edn projects with setups that don't include CLI tools, and although I don't have full info yet I can see that the jack in process is making a call to java -jar rather than clojure, and they're getting errors starting Errors while parsing option "--config-data. Again, I don't have full info yet, but so far all I've been able to suggest is that they maybe try updating Calva and/or installing the CLI tools, which may be a fairly deep rabbit hole for some of them at this point. I thought at first that the problem might stem from an improperly-constructed minimal project (which they had to build themselves), but for one student the same problem occurred with a minimal project that I created and shared (and which worked fine for me, but I do have the CLI tools installed). I think that at least one student with this problem is running Windows, and at least one is running MacOS. @U0ETXRFEW or others, does this situation suggest a fix to you?

pez14:02:31

There is a known bug in some Java installs on Windows that could be in play. Never heard of any problems like this in Mac, though. Can you obtain some more of the error messages? Maybe that gives us a hint.

lspector14:02:13

Thanks! Will pass along all the info I can. In one of the screenshots a student sent (I think this is on windows because there's a "\" in the path to the .jar) I see "java.lang.NumberFormatException: Invalid number: 1.0.0"

lspector14:02:38

In another, which looks like it's from a mac, I see this different error:

pez15:02:38

The error from that Windows machine looks like from a buggy version of the Java launcher. Upgrading/reinstalling Java is the only remedy.

👍 2
pez15:02:13

That other error… I have no idea. Can you check if the Getting Started repl gives the same error?

lspector15:02:55

Will do! Thanks for the speedy replies!

lspector19:02:14

Asking about online REPLs on #beginners for students who are having installation/jack-in issues I was reminded of the astounding https://calva.io/get-started-with-clojure/!

lspector19:02:52

This is really a great solution while students haven't yet gotten their setups working yet! I'm going to pass this along to my students. I have a few questions about it, which I'll take to the main channel instead of in this thread.

pez19:02:20

Indeed. That's an environment that anyone can use without installing anything. You could create a setup using your minimal project that runs like that. We can do it together at least.