Fork me on GitHub

I've found a lovely bug in cider-nrepl. The way that tools.nrepl compatibility interacts with lazily loaded middleware means that sometimes cider can use cider/nrepl for one namespace, and org.clojure/tools.nrepl for another. @bozhidar A) why does the implementation look for tools.nrepl first? B) Why use find-ns and not try-require?


fwiw, this means that for me, cider-refresh is completely unusable unless I do a careful dance first to make sure cider loads carefully.


Oh, I see. I've been assuming nobody else writes commit messages. I looked now.


So the trick here is that under boot/lein, we're running inside an existing tools.nrepl, and we need to detect that. But inside clj cider/nrepl is used via cider.main, meaning that tools.nrepl is not the context in which we're running. However, figwheel is trying to load tools.nrepl, and fails if it cannot.


Building figwheel sidecar from master works, so I guess figwheel sidecar isn't updated to support cider/nrepl. @bhauman any problem with a new snapshot from master?


@dominicm yeah I can update the snapshot


and a release is probably overdue


That would be wonderful, thank you.


There's perhaps a more underlying issue here, but excluding a tools.nrepl dependency from figwheel sidecar does the job for me. Edge is the delicate balance of Clojure anyway.


@dominicm have you looked at figwheel-main adoption yet?


or is that too much to chew on right now?


@bhauman it's on my todo list. We're reworking our build tool significantly, but we are also just kicking off a new client project.


@dominicm 0.5.17-SNAPSHOT deployed


I need to look at the API for figwheel main too. I might have some feedback from that really, so sooner is probably better with me doing that. But time is short.


@sb yes, I do this regularly. I start my app externally via lein repl, then connect to it twice. In one of the REPLs I start the ClojureScript REPL. It takes some effort, but works, and is a big improvement on many years of ClojureScript REPLs which I was never able to get to work 🙂


Thanks! I got a great tip from ‘roosta, cider-jack-in clj&cljs (in the emacs) and that is working now fine.


Start both environment.


I wonder — am I the only one using aggressive-indent? It causes unbearable slowdowns and sometimes weird behavior (such as emacs waiting for me to press a key until proceeding). I managed to profile one possible cause, reported and I think fixed in clojure-mode, but I'm still seeing this. Perhaps because there was no recent release of clojure-mode?