Fork me on GitHub
#calva
<
2022-03-13
>
orestis09:03:42

When hacking on Calva, is the workflow really to hit F5 to launch the compiled extension, then jack-in? Is there's a faster way to do this? Perhaps I should launch a babashka REPL instead?

pez10:03:05

I do: 1. F5 2. Copy Jack-in Command Line, 3. Paste that in an integrated terminal 4. Connect Then on recompiles I restart the debug process, causing the extension host to reload. It will still have the clojure process running. So it is just Connect. We should probably mention this process on the wiki...

orestis13:03:47

Can you describe how you restart the debug process?

Lukas Domagala14:03:16

you can restart by calling “Developer: Restart extension host” in the vs that’s being debuged or you can hit the green reload thing in the vscode that has the calva source

Lukas Domagala14:03:08

There’s a ticket to make the reconnect to repl automatic: https://github.com/BetterThanTomorrow/calva/issues/1464

pez15:03:49

Developer: Reload window in the Calva under development also works. But I usually use that green reload thing via the keyboard shortcut it is bound to, F5.

Taras18:03:09

I’ve tried Evaluate Enclosing Form from evaluation documentation but have the following error. Is it expected behavior?

Cora (she/her)19:03:22

is foo defined at that point? I'm betting not

Cora (she/her)19:03:35

Clojure 1.10.3
user=> (str foo)
Syntax error compiling at (REPL:1:1).
Unable to resolve symbol: foo in this context
user=>

1
Taras22:03:31

@U02N27RK69K Thank you for your answer. I tried to use example from this page https://calva.io/eval-tips/

(let [foo :bar]
  (when false (str| foo))) ; => ":bar"
so, foo is defined inside let block. Please correct me if I am wrong but I thought that Evaluate Enclosing Form should evaluate foo with let context but omit (when

Cora (she/her)22:03:14

that sounds wrong to me. how would it decide which things to evaluate and which not to? why would let be different than when?

Cora (she/her)22:03:11

I think the docs need to be updated there

Taras22:03:15

agree, It is a little bit difficult to understand what Evaluate Enclosing Form means from the docs

Cora (she/her)23:03:53

it definitely should just evaluate the (str foo)

Taras23:03:10

I got it. Thank you

pez10:03:11

That's a very bad example in the documentation. Thanks for bringing it to our attention!

Lukas Domagala23:03:06

https://github.com/BetterThanTomorrow/calva/pull/1596 lsp/repl provider options are moving along. Us running the provider twice is probably the reason that goToDef sometimes fails to use LSP even if the repl can’t find anything

🎉 1