Open jeaye opened 2 years ago
Small note here. I changed the server to just handle drawbridge (running another jetty instance) on another port, rather than at a specific route. That way just the host + port combo would work. The only thing missing there is that Conjure would actually need to use the drawbridge client: https://github.com/nrepl/drawbridge#in-clojure-tooling
Naturally, trying to connect Conjure to the drawbridge HTTP port currently results in an immediate disconnect, due to the mismatched protocols.
Hey! It's a neat idea and I'll need to look into what it'll take to support the transport, I think I currently assume nREPL is bencode over a socket but I can probably refactor that to make it pluggable. I can't promise quick turnaround on that though, it's something I've never used before so it's going to involve a little bit of research from my end.
Keeping an open mind and will do some reading though.
Thanks for the follow up, man. Since I wanted to get something working, I ended up dropping drawbridge for this project, since heroku has the ability to bind ports between my local machine and a remote server. So I just run an nrepl server from Clojure and then use the heroku cli tool to bind that port to localhost and create an .nrepl-port
file for Conjure. Everything else just works. Here's the ./bin/heroku-repl
script (it blocks on the port forward, so just Ctrl-C when you're done):
#!/usr/bin/env bash
set -euo pipefail
function cleanup
{
rm -f .nrepl-port
}
trap cleanup EXIT
port=8123
echo "$port" > .nrepl-port
heroku ps:forward "$port"
However, if this project were using anything else for infra (AWS, Azure, GCP, etc), drawbridge would become necessary again, so I do think it'd be a really useful feature to have. Whether or not it makes sense in Conjure is up to you, good sir.
Heya, Olical. Happy holidays.
I'm just setting up a Heroku app and I was following a guide to configure drawbridge so I can REPL into the staging servers. The way this works with leiningen is like so:
However, I can't then connect Conjure to that repl connection, since lein doesn't expose it to a local port. I see that Conjure has support for host + port with
:ConjureConnect
, but I need to specify an actual path, since drawbridge handles the repl communications over HTTP.It'd be great to have support for something like
:ConjureConnect https://my-app.herokuapp.com/repl
so this repl dream can come true. I don't know very much about what's needed to get Conjure to do the same as that leiningen command, though. What are your thoughts?