calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
pez 2021-03-19T09:13:56.033Z

Dear friends of Calva. Please consider subscribing to the CalvaTV channel on YouTube, and also like and comment a bit on the material. Hopefully that can make it a bit more visible there. https://www.youtube.com/calvatv (Of course, please tweet and such about the material as well. šŸ˜ )

šŸ“ŗ 4
wevrem 2021-03-19T13:54:49.033800Z

I need help. Iā€™ve been using Calva for a while, and Iā€™m wondering if something is out of date or some dependency mismatch. Whenever I open or create a new project, I try to Jack-in and get this error: clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.25.8"}}}' -A:test /bin/sh: clojure: command not found Jack-in process exited. Status: 127 Iā€™m on mac, Big Sur, both Calva and VS Code are up to date (Iā€™m pretty sure). What am I doing wrong? To fix this I have to quit VS Code and re-open my project, and that usually works, but sometimes not, and I canā€™t seem to have two projects going at the same time.

pez 2021-03-19T13:56:27.033900Z

The error didnā€™t make it trough. šŸ˜ƒ

šŸ˜† 1
wevrem 2021-03-19T13:58:02.034600Z

I am still learning the Slack editor and how to hit return to add lines instead of submit the message. I think I got it.

pez 2021-03-19T14:02:02.034800Z

I think you are running into the common problem that VS Code is not started with an environment that has the Clojure stuff available. Try starting VS Code from a terminal where you know you have clojure on the path.

wevrem 2021-03-19T14:12:32.035Z

okay, that definitely worked. I had made myself an automator script so that I could right-click on a folder and open it in VS Code, and then sort of forgot that I had created that helper tool. I bet there is something with that tool that is not picking up the path/environment correctly. Iā€™ll go investigate. Thanks for the help.

wevrem 2021-03-19T14:34:57.035200Z

Question: When Iā€™m in a ā€œproblemā€ project, and jack-in is saying it canā€™t find clojure command, I can still open a terminal (in the project), start nrepl (using the same options that jack-in would use, copied directly from the error message above, for example) and then use Calvaā€™s ā€˜connect to running REPL server in the projectā€™ and that works okay. I donā€™t understand enough to know why of these two terminals within the VS Code project, one of them canā€™t find the clojure command and let me jack in, but the other will let me manually start repl. Do you know what is going on? Itā€™s probably a VS Code thing more than a Calva thing?

pez 2021-03-19T15:15:59.035400Z

Not sure actually. At first I thought it was the same problem I have, that VS Code, when started from the MacOS Finder does not get the right environment. But now you tell me that from a terminal in the project the command works. Is that from a terminal, in the project, in VS Code? Or is it from a terminal outside VS Code?

wevrem 2021-03-19T16:19:12.035600Z

On my last comment, I was talking about terminals within the project itself. VS Code built-in terminals.

wevrem 2021-03-19T16:20:14.035800Z

BTW, Calva is awesome.

2
ā¤ļø 2
seancorfield 2021-03-19T16:56:39.036Z

The Terminal opened inside VS Code is going to start up using your regular .profile and other dot-files, so the path will be correct, and clojure will be accessible.

seancorfield 2021-03-19T16:57:11.036200Z

macOS has always been a bit of a pain in regards to processes started from the Finder.

seancorfield 2021-03-19T16:57:40.036400Z

I always start VS Code from the Terminal via the code command to avoid any of thatā€¦

seancorfield 2021-03-19T16:58:56.036600Z

But then my Terminal usage is a bit heavy šŸ™‚

šŸ˜‚ 2
wevrem 2021-03-19T17:22:25.037100Z

Sean, I attended the Provo meetup a few months ago and remember your terminal use was a bit out of control. Donā€™t know how you keep track of it allā€¦

pez 2021-03-19T17:23:47.037300Z

I also always start VS Code from the terminal. I think it is super strange that you can use the jack-in command from a VS Code terminal but that jack-in fails with that message. I have never seen that before. Jack-in shares the environment with VS Code, as I was sure the VS Code terminals also did.

wevrem 2021-03-19T17:23:47.037500Z

Iā€™ll try and get in the habit of using the code from the command line, and as a backup, for when I forget to do that, I think I can manually start the REPL and then connect to it with Calva.

pez 2021-03-19T17:25:34.037700Z

There is a command for copying the jack-in command to the clipboard. But still, super strange all this. Can you file an issue report from VS Codeā€™s Help menu? It will attach some system info to the report that might shed some light on the mystery.