Fork me on GitHub
#calva
<
2019-11-04
>
Mark Addleman00:11:57

I'm having trouble jacking into Clojure CLI + shadow-cljs. I cloned the fulcro 3 template (https://github.com/fulcrologic/fulcro-template) and tried starting up CLI + shadow. I get a Calva says message "Jacking in..." but after several minutes, nothing happens. Is it timing out?

Mark Addleman00:11:38

The terminal reports

> Executing task: clojure -Sdeps '{:deps {nrepl {:mvn/version "0.6.0"} cider/cider-nrepl {:mvn/version "0.22.4"} cider/piggieback {:mvn/version "0.4.1"}}}' -A:dev -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware cider.piggieback/wrap-cljs-repl]" <

nREPL server started on port 34405 on host localhost - 

Mark Addleman00:11:41

I can launch CLI repl or shadow separately

pez05:11:54

I think Calva fails picking up when the nrepl port file is created. I haven't tried that template myself, so aren't familiar with how it is wired. It might be that you'll need to work with two separate vscode windows...

Mark Addleman05:11:44

I was wondering if that was the problem. Is there a way to get Calva to create two separate repl environments? When I've tried to starting (jack in) a shadow repl after starting (jack in) a CLJ repl, the first one is killed

pez05:11:32

Currently two separate vscode windows is the only way. But it begs the question how to open the same folder in two separate windows for the same folder... Probably via workspaces.

cfehse08:11:12

@mark340 @pez The cause of the connection problem is that calva expects the port file for "clojure CLI + shadow" to be created in the .shadow-cljs subdirectory while in this project configuration (https://github.com/fulcrologic/fulcro-template) the port file is created in the project directory. I am not sure why.

Mark Addleman15:11:02

Yes, I see this issue in my env as well. Curiously, starting shadow-cljs (only) from Calva creates those files while Clojure CLI + shadow-cljs does not.

pez08:11:58

I think we need to revisit the “Clojure CLI + shadow-cljs” Jack-In sequence. Maybe remove it even.

pez08:11:25

Anyway, there are a few things to this. Too long for a comment in this channel, so I whipped up a small Jack-In guide, which hopefully makes it clearer what is going on and why you need to use separate VS Code windows for this template project. • The Calva Jack-in Academy: https://calva.readthedocs.io/en/latest/jack-in-guide.html • Tips on how to actually open the same project in two separate windows: https://calva.readthedocs.io/en/latest/workspace-layouts.html#one-folder-two-windows

👍 12