Given: 1. a remote process without reveal on the classpath (but with the ability to also provide a prepl) 2. an editor that talks to the process in 1. via nrepl Is there a way to launch a reveal window that could receive tap> output from a tap> command sent from 2 to 1?
Finally. I got it working. I had two errors:
1. I originally put to -J-D... arg at the end as opposed to before -M
2. as the target jvm runs inside a docker container, I had to add :address "0.0.0.0"
to the prepl config map
I also forgot to properly expose the port through docker
If you run docker locally, I think you might even be able to run Reveal inside docker
I don't have any links at hand, but I saw some posts about running desktop ui from within docker..
well, it isn't on the classpath for that process and the jvm there doesn't have fx
but working this out basically enables me to use reveal with whatever jvm I have to use in a project
as I can always run it on my dev box where it's available
huge kudos to you for making this available
my pleasure!
Hi! I made a blog post about this setup: https://vlaaad.github.io/reveal-repls-and-networking
ah, sorry, there is nrepl, not a replβ¦
yeah π
I wish editors would just migrate to prepl already
But I guess, if you connect reveal to a prepl server in a remote VM 1, and then you connect your editor to a nrepl server in remote VM 1, and invoke tap>
using nrepl connection, it will be forwarded to reveal since tap is a global queue per VM
I tried that, it didn't seem to work, I probably messed something up
Does the reveal window register itself as a tap when it shows up?
(when started with remote-prepl)
it doesn't seem like it does
I just tried it and it worked...
here is my setup: 1. remote process with prepl server:
clj -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"}}}' -J-Dclojure.server.prepl='{:port 7777 :accept <http://clojure.co|clojure.co>
re.server/io-prepl}'
2. reveal connected to remote process:
clj -Sdeps '{:deps {vlaaad/reveal {:mvn/version "1.3.196"}}}' -X vlaaad.reveal/remote-prepl :port 7777
3. using different connection to tap values:
clj -Sdeps '{:deps {vlaaad/remote-repl {:mvn/version "1.1"}}}' -X vlaaad.remote-repl/repl :port 7777
(tap> 1)
{:tag :ret, :val "true", :ns "user", :ms 1, :form "(tap> 1)"}
{:tag :tap, :val "1"}
and when I invoked (tap> 1)
, it also appeared in reveal window
does it help?
oh, I forgot to actually use nrepl, but it works with nrepl too
here is a complete example: 1. nrepl server + prepl server in a single remote process:
$ clj -Sdeps '{:deps {nrepl/nrepl {:mvn/version "0.8.3"}}}' -J-Dclojure.server.prepl='{:port 7777 :accept <http://clojure.co|clojure.co>
re.server/io-prepl}' -M -m nrepl.cmdline
nREPL server started on port 63380 on host 127.0.0.1 - <nrepl://127.0.0.1:63380>
2. reveal connected to prepl server:
$ clj -Sdeps '{:deps {vlaaad/reveal {:mvn/version "1.3.196"}}}' -X vlaaad.reveal/remote-prepl :port 7777
3. editor connected to nrepl server
4. evaluate (tap> 1)
5. tap is shown in the Reveal windowThank you for that, I'll compare it with what I tried. Probably some typo then on my side.