Fork me on GitHub
#calva
<
2021-02-21
>
jlmr15:02:21

Hi, I’m just starting out with Calva, it looks great so far! I’m trying to get Calva to open reveal automatically once I jack-in, but I can’t get it working. I’ve added an alias to my .clojure/deps.edn as described here: https://calva.io/reveal/#use-reveal-nrepl-middleware When I jack-in and select the reveal-nrepl-middleware alias, the reveal window does not appear. I’ve also tried adding (do (require '[vlaaad.reveal]) (vlaaad.reveal/ui)) to afterCLJReplJackInCode . This opens the reveal window automatically, but evaluated expressions do not appear in the reveal window. Any tips?

bringe20:02:20

I haven't used reveal, but do you see any errors in the repl output? Feel free to create an issue with repro steps and details like your OS, JDK version, and Calva version so we can investigate.

jlmr08:02:29

clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.25.8"}}}' -A:add-libs:reveal-nrepl-middleware:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]"
WARNING: When invoking clojure.main, use -M
nREPL server started on port 49526 on host localhost - 
This is the output I’m getting. No errors, but I do see a WARNING about invoking clojure.main

bringe17:02:20

I see. What about in the output.calva-repl window?

jlmr19:02:57

A I think I see the error: ; Starting Jack-in Terminal: clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version,"0.8.3"},cider/cider-nrepl {:mvn/version,"0.25.8"}}}' -A:add-libs:reveal-nrepl-middleware:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware]" The --middleware is different from what I have in the reveal-nrepl-middleware alias in my deps.edn:

:reveal-nrepl-middleware {:extra-deps {vlaaad/reveal {:mvn/version "RELEASE"}}
     				      :main-opts  ["-m" "nrepl.cmdline"
                  					   "--middleware" "[vlaaad.reveal.nrepl/middleware,cider.nrepl/cider-middleware]"]
                  		  :jvm-opts ["-Dvlaaad.reveal.prefs={:font-size,14,:theme,:light}"]}
Could it be that Calva overwrites this setting somewhere?

bringe23:02:22

Hmm. Is that in your project deps.edn or ~/.clojure/deps.edn? Not sure if that matters here, but @U0ETXRFEW probably knows more about this middleware thing.

jlmr13:02:55

This is in my ~/.clojure/deps.edn there are no conflicting aliases in my project deps.edn

jlmr13:02:19

@U9A1RLFNV Might be better if I file an issue on Github I guess?

pez13:02:35

There are some (closed) issues there already. Maybe you can find some help there. Just a moment.

bringe17:02:22

If info from that issue doesn't help, please file a new one.

bringe17:02:43

@U0ETXRFEW Will jack-in use the middleware from the :main-opts of an alias, or is it required to start the repl manually then connect?

pez17:02:55

If Calva knows that an alias provides main-opts then it won’t use the default middleware. That would mean that for @U56R03VNW’s jack-in to work, the alias needs to be in the projects deps.edn file. (Calva does not read user deps.edn files.)

👍 1
pez17:02:18

@U56R03VNW file an issue about this, I think. We should either document this clearly or add functionality to Calva to handle this more directly.

pez20:02:22

New attempt to get deps.edn jack-in work on Windows even when Calva is run from a path containing spaces. @cb.lists And if other windows users want to help test it as well, that would be swell. deps.edn jack-in and the standalone repl starts should both still work, or I have broken something: https://11520-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.173-814-connect-without-project-f25a7680.vsix

naproxen23:02:44

I couldn't find documentation about "calva.jackInEnv": {  } settings

pez23:02:46

This is all documentation there is about it: https://calva.io/connect/#customizing-jack-in Maybe a bit scarce, but I’m not sure what more there is to say about it…

parens 1
pez23:02:19

And about that Getting Started REPL, here’s the PR to follow for that: https://github.com/BetterThanTomorrow/calva/pull/1041

naproxen00:02:06

this zip doesn't contain .vsix file do I do something wrong ?

bringe00:02:18

Clicking that link above should download a .vsix file for you. It did for me. Does it not for you?

naproxen00:02:56

I got a zip: calva-2.0.174-1040-getting-started-repl-c61e5e6e.zip

naproxen00:02:11

I've manually convereted .zip to .vsix I got an error

pez00:02:27

Converted?

naproxen00:02:07

I mean just changed extension (converted was wrong word)

pez00:02:12

You should get away with just changing the file extension.

pez00:02:30

What was the error you got?

pez00:02:30

Strange. I'm afk and can't test this myself. Let's see if someone else can. Never had that happen before...

✔️ 1
seancorfield02:02:05

@UJ35GLZU7 I just downloaded that on Windows, got the zip, changed .zip to .vsix, and then in VS Code > Extensions > ... > Install from VSIX... and selected the newly renamed .vsix file and it installed fine for me.

❤️ 1
pez09:02:18

Maybe the file got corrupted in your download @UJ35GLZU7. I just tried it (on Mac, but anyway) and vscode happily just uses it.

naproxen22:02:11

again I got Element 'Identity' has invalid value for attribute 'Version' ---> System.FormatException: Input string was not in a correct format. but np I'll wait normal release 🙂

pez08:02:46

Frustrating. I was hoping to get a tester on the new feature. I’ll post a new VSIX link and maybe that one will work.