QUESTION ABOUT EDGE
We’re building a OneJar and deploying it in Docker, starting it up passing in -Dclojure.server.myrepl='{:port 50505 :accept juxt.edge.server.pretty-repl/repl}'
. I have been trying, with no success, to connect an nrepl client to it. I was able to add a log to juxt-edge.server.pretty-repl/repl
and see that when my client connects, it triggers the log, but the repl gets no prompt and is unusuable. My assumption is that it has something to do with the output (and possibly also the input) not being correctly attached. I’m trying many different paths to try to get more debugging info out but having no success.
As mentioned, the socket repl isn't a nrepl. You need to us nc
instead.
I have taken Docker out of the testing equation, just running my onejar at the command line; that behaves the same.
We've tried several different REPL clients, including leiningen, tools-deps, and cider. Cider is the only one so far that gives some kind of feedback:
nrepl-send-sync-request: Sync nREPL request timed out (op clone id 1)
Looking at the edge docs and the cider docs, it seems edge runs a socket repl
which cider
doesn't support
https://docs.cider.mx/cider/faq.html#will-cider-eventually-support-the-clojure-1-8-socket-repl
https://juxt.land/edge/docs/socket-repl.html
can you try and do:
nc localhost 50505
https://lambdaisland.com/guides/clojure-repls/clojure-repls#org259d775 has a bit about connecting the socket repl, but it's not edge specific
We finally worked around it for now but starting up our own nrepl server in our code. As for the port…we were definitely opening it, as evidenced by the fact that a log message I stuck in the juxt edge repl printed. It’s no longer a blocker, even if I don’t love the solution.