Fork me on GitHub
#cider
<
2020-07-02
>
jacklombard10:07:17

Is there a way to load the cider-nrepl middleware on the fly?

jacklombard10:07:00

When cider-connect ing, can I load the middlewares on the fly?

practicalli-johnny12:07:28

The cider-connect process connects to a running project, so you need the cider-nrepl middleware to talk to that process. The command line you use to run the Clojure project should include all dependencies, including any middleware. This can be added to the project or the general configuration of the build tool you are using (e.g. Leiningen, Clojure CLI or Boot). https://docs.cider.mx/cider/0.25/basics/up_and_running.html

jacklombard12:07:09

Yes I am aware of that, and this is what I wanted to do on the fly

bozhidar21:07:00

nREPL 0.8 supports dynamic loading of middleware, but CIDER hasn’t implemented that yet.

jacklombard04:07:13

Thanks that is what I was looking for, but the examples use cider middleware. When you say it hasn’t been implemented yet, do you mean, CIDER doesnt automatically do that for us when we cider connect but we can load the middlewares manually?

jacklombard04:07:34

Also a noob question, say I can load these middlewares dynamically, will they be added to the nREPL client or the server?

jacklombard04:07:08

Server I am assuming

bozhidar05:07:43

The idea is that client would load them dynamically into the server. That’s why the client would need to know how to do so.

bozhidar05:07:19

Invoke the right ops, know where to look for the resources it will load, respond to the server messages.

jacklombard06:07:44

Got it, thanks 🙂