Fork me on GitHub
#tools-deps
<
2019-09-20
>
shaun-mahood22:09:58

For clj-on-windows, how would I start a socket repl? I'm trying powershell -command clj '-J"-Dclojure.server.repl="{:port 5555 :accept clojure.core.server/repl}""' but not sure if I have the quotes wrong or if there is something else going on. The REPL starts up, but I can't get to the socket repl at all.

seancorfield22:09:56

@shaun-mahood Did you try with comma instead of space in that?

shaun-mahood22:09:18

Of course not - I never think of the Corfield comma 🙂

seancorfield22:09:34

Alternatively, just use an alias in your deps.edn (which is how I do it on Powershell).

seancorfield22:09:32

(and it has to have commas in the deps.edn version because of the round-tripping through the .cpcache files and shell etc)

seancorfield22:09:16

@shaun-mahood Did it work with the comma?

shaun-mahood22:09:52

No luck yet - I might be putting the commas in the wrong place though

shaun-mahood22:09:07

I just realized I have to put lein on that machine, though, so I might use that instead - saves me from figuring out how to get Cursive to connect to a socket repl

seancorfield22:09:49

Cursive requires nREPL doesn't it? So you wouldn't want to start a Socket REPL anyway.

shaun-mahood22:09:46

Yeah, I think there's a way around that (using https://github.com/mfikes/tubular), but nREPL is the way to go for this one I think.

seancorfield22:09:07

clj -A:nrepl 🙂

seancorfield22:09:43

:nrepl {:extra-deps {nrepl {:mvn/version "RELEASE"}}
          :main-opts ["-m" "nrepl.cmdline"]}

shaun-mahood22:09:32

Yeah that looks nice and easy 🙂

seancorfield22:09:49

This is why I have so much stuff in my .clojure/deps.edn file -- and I have it on every machine and under every shell (macOS, Windows Powershell, WSL, etc)

shaun-mahood22:09:12

@seancorfield It looks like it was a firewall issue, not a Clojure issue - thanks for the help, using your aliases I at least found where the problem was. Now to figure out why Windows Server is ignoring me when I tell it to open a port...