Fork me on GitHub
#calva
<
2019-05-20
>
orestis05:05:18

Good morning! If I want to setup a clojure beginner with Calva, should I use the released 1 version or would starting with version 2 make more sense? I’m only looking for basic stuff, connecting to an existing repl, evaluating forms and seeing the results on a separate pane.

slipset06:05:31

@orestis I would start with version 2, and see how that works out.

slipset06:05:37

version 1 forces you to deal with ~/.lein/profiles.clj, and when you do the switch to version 2, you will (after some time) have to remember to nuke the calva-related stuff there.

pez06:05:43

Is it clj or also cljs?

orestis06:05:07

It’s both but cljs isn’t strictly needed for now.

slipset06:05:30

Also, I’m sure @pez (and the channel) would like to hear about any hiccups you encounter along the way 🙂

orestis06:05:19

I’m not sure I can see where to download v2 - is there a releases page on github?

pez06:05:23

It's included in the repo for now.

pez06:05:55

alpha-build in the root dir iirc

orestis06:05:20

Cool! I’ll check it out this week :)

orestis06:05:14

Found it, in dev branch

pez06:05:32

Yeah, that too. 😀

orestis06:05:03

Any instructions for installation?

pez06:05:24

I should include that in the dir. Anyway. In vscode, open the extensions pane and use the meatballs menu to ”install from VSIX”.

orestis06:05:45

😂 meatballs menu

orestis06:05:56

That’s a new one

orestis06:05:31

Cool! Expect more questions soon, and thanks for all the hard work!

pez06:05:56

Hamburger, meatballs. I am a Swede after all. 😃

orestis06:05:02

Tak for Calva !

pez06:05:43

Varsågod!

orestis07:05:51

Hitting ctrl-alt-v shows an error here 🙂

orestis07:05:50

Now I get “command calva.connect” not found. I’m in a .clj file

orestis07:05:01

OK, you have to restart vs code after installation. I expected a prompt about it from VS Code 🙂

orestis07:05:59

I have a nREPL session all started and waiting from my terminal (it’s the one I use to connect from Cider). Can’t seem to make Calva connect to it. I pass the correct port and everything, and I saw that i tried to do something (load mr anderson etc) but then it fails.

orestis07:05:51

Hooking up nREPL sessions...
Connected session: clj
Failed connecting. (Calva needs a REPL started before it can connect.)

orestis07:05:13

I’m not sure why I’m asked about CLJS in the beginning. I only want a plain CLJ repl for now.

orestis07:05:40

Gotta run. I’ll resume later. Any pointers welcome

pez07:05:20

When you're back, @orestis, can you post a screenshot on when you are asked about CLJS in the beginning?

pez07:05:41

nm, I see it now. That is so wrong.

pez08:05:40

I've uploaded a new alpha-build, @orestis. Shouldn't make a difference for your connect case. But I'd love it if you wanted to try jack-in instead.

orestis08:05:40

Can’t use jack in for this project, it has its own machinery to start an nREPL

pez08:05:49

Can you share some details about the machinery? I'm very curious about the boundaries of jack-in.

orestis08:05:59

Oh, it starts an http server, kicks-off a shadow build, does things in the background, and incidentally also starts nREPL and Socket REPL. So it’s our code that drives the process. Can’t really emulate that with any kind of jack-in. I’ve actually found jack-in to be more trouble than it’s worth, even for beginners.

pez08:05:04

Is it a shell script?

pez08:05:09

Without knowing more about it I'd like to challange that ”any kind of jack-in” 😃

pez08:05:15

While, of course, fixing whatever I broke with connect, when fixing that jack-in process...

pez08:05:20

I'd appreciate an issue about connect so that I know what to do when I have some Calva time.

orestis09:05:52

It is been kicked off by a shell script, but it’s shadow-cljs driven

pez11:05:56

Cool. I think there should be some basic support for helping people get the Calva dependencies right, but will have to ponder it some. Shadow sort of is that basic support, of course.

orestis13:05:57

Which log should I be looking into @pez to give you some information about this?

pez14:05:51

@orestis there is an output channel ”Calva Connection Log” that is supposed to collect some of this, but it seldom contains anything interesting. I'm doing something wrong there. But the description of the problem you provided earlier today is enough for now. And that was two issues: 1) The connection fails. 2) Why does it ask about CLJS stuff first thing?

kstehn14:05:55

oh nevermind found the problem, had some old dependencies in profile.clj and project.clj

pez15:05:08

@slack1038: You should be using piggieback 0.4.1, which contains an important bug fix. If you want to collect some Karma, please update the wiki. ❤️

kstehn15:05:12

Should i make a pull request for it? i never updated a wiki

pez15:05:50

Just click edit. 😃

kstehn15:05:54

also with the current calva snapshot i cant connect to the repl, it says failed to connect no other errors

kstehn15:05:17

okay just did it 🙂

pez15:05:25

Sounds similar to what @orestis reported. Can you give us some details about your project? Also, tried jack-in? Or was that what failed?

kstehn15:05:21

No jack-in just dont work, says no project.clj found The problem here is i hava multiple clojure projects in my workspace so i guess that is the problem with jack-in

pez17:05:12

Does it work to open one of the subdirectories I'm a vscode window and then jack in?

pez17:05:45

Or maybe use the calva projectdir setting...

kstehn18:05:34

will try tomorrow when i have some time 🙂

pez19:05:48

If you think things like “I wish it worked a bit more like this”, I wanna know. 😃