Fork me on GitHub

After jack-in-cljs, and then opening the app in a browser I often get this exception:

1. Unhandled clojure.lang.ExceptionInfo
   Expected REPL Connections Evaporated!
   {:type :js-eval-exception,
    {:status :exception,
     :value "Expected REPL Connections Evaporated!",
     :stacktrace "No stacktrace available."},
    :form (set! cljs.core/*print-namespace-maps* true),
    :js "(cljs.core._STAR_print_namespace_maps_STAR_ = true)"}
This results in no working figwheel REPL in cider, but the rest of the figwheel process works as expected (e.g. it still compiles and reloads). Any pointers to some options I can tweak to avoid this?


(This might be better directed at #figwheel-main, Iā€™m not exactly sure)

Christopher Miles15:10:18

I'm having problems with Emacs and Cider on Windows using a deps.edn file, I was wondering if anyone else had issue with this combination. We have an alias in this project called "dev" that includes the paths to the project source but I can't seem to get Cider to set that path. I can try to edit the command, but it's a big blob of base64 encoded text.


I can't help much here however you might have better luck by launching a nrepl (+ cider-nrepl, refactor-nrepl) process from a terminal and then running cider-connect against that It's a more transparent approach if just a little more manual

šŸ‘ 1
Christopher Miles16:10:08

Yes, you are correct: that's the only thing that's worked for me so far. The "escaping quotes" section on the clj-on-windows project page kind of hints that something nutty is happening.

šŸ˜Æ 1

I'd guess that not many maintainers hack on Windows so you might find something interesting / PR-able by inspecting the source and evaling various forms in an Elisp repl. Else you can always report an issue over GH

Christopher Miles17:10:10

I can't seem to make it work, I wonder if there's something weird happening that is preventing it from seeing the deps.edn file. I did submit an issue. šŸ™‚

Christopher Miles19:10:25

Thanks @U45T93RA6, setting the cider-clojure-cli-aliases variable did resolve my problem.

cider 1

Hi folks, I am trying to install clj-refactor from source but I have some problem finding the inflections package's source - where does the project live?


Hi there, today is nrepl day. I thought I knew how to do this but when I start nrepl this way

(nrepl-server/start-server :port port
                                          :address bind-address
                                          :middleware [#'cider.nrepl/cider-middleware #'refactor-nrepl.middleware/wrap-refactor])
I get the warnings that functions may not be available... I tried symbols as well to no avail, is there anything there obviously wrong I am doing?


Oh, did :middleware disappear on start-server?


its not there. i think you create a handler with middleware


for your handler i think you want cider.nrepl/cider-nrepl-handler


which is just

(def cider-nrepl-handler
  "CIDER's nREPL handler."
  (apply nrepl-server/default-handler (map resolve-or-fail mw/cider-middleware)))


This is what eventually worked:

(def custom-nrepl-handler
  "We build our own custom nrepl handler, mimicking CIDER's."
  (apply nrepl-server/default-handler (conj cider.nrepl.middleware/cider-middleware 'refactor-nrepl.middleware/wrap-refactor)))
The fact is that cider-middleware is actually middleware*s* and you need to add the refactor-nrepl one to it


probably we should have an 'official' snippet for this, or if it's around in the docs already it should be more easily discoverable.