Yes, but if the Drawbridge endpoint is e.g. at http://localhost:3001/repl, host and port isn't enough, need to pass the /repl
bit as well. And anyway, connecting to a Drawbridge endpoint is done via nrepl/url-connect
, whereas nrepl.cmdline
currently uses nrepl/connect
.
OK. So I am doing something wrong, but can’t figure out what it is. Maybe someone in here can see some pattern that I am missing so that I can start looking at the right place for the source of error. In my little test project I could get things to work (see above), but in Calva, I still have something lurking. The symptoms are:
1. Everything seems to be dandy with CLJ repls.
1. In CLJS repls things go wrong if I try to do something as simple as (println 1)
.
1. Evaluating things in general, works.
1. Things go wrong liks this:
1. I get an ex
message back class java.lang.IllegalArgumentException
. I’ll post the stacktrace in a separate snippet.
1. I get an exception in the terminal/process I started the repl from. I’ll post that as a seperate snippet too.
@pez how are you starting it up?
The Clojure REPL is started like so for a cli/deps project:
clojure -Sdeps "{:deps {nrepl {:mvn/version \"0.6.0\"} cider/cider-nrepl {:mvn/version \"0.21.1\"} cider/piggieback {:mvn/version \"0.4.0\"} figwheel-sidecar {:mvn/version \"0.5.18\"}}}" -m nrepl.cmdline --middleware "[cider.nrepl/cider-middleware cider.piggieback/wrap-cljs-repl]"
Then it depends on project type for the cljs repl, but for figwheel:
(do (require 'figwheel-sidecar.repl-api) (if (not (figwheel-sidecar.repl-api/figwheel-running?)) (figwheel-sidecar.repl-api/start-figwheel!)) (figwheel-sidecar.repl-api/cljs-repl))
does figwheel sidecar and the old figwheel work with clojure
?
Yes. And I have the same problems with Leiningen. 😃
Thanks, @bozhidar , but I'm pretty sure this is not a fault with nrepl or other tooling. It's me getting lost in async calls and not being able to read the signs. I long for that facepalm, even if it's going to hurt.