Fork me on GitHub
#cider
<
2020-08-17
>
zackteo11:08:45

Might be a silly question but how does one add dependencies, without killing cider and starting it up again. I can't seem to get it to work with cider-restart

practicalli-johnny12:08:55

The most reliable way I found was to restart the cider repl. I use deps.edn projects and stop/starting a repl only takes a couple of seconds.

practicalli-johnny12:08:25

It seems to depend on the project and the version of CIDER / clj-refactor. I found clj-refactor unreliable and I beleive hot loading of dependencies in a running REPL was disabled, as it used to cause a lot of issues at one time. Not sure if it was re-enabled.

zackteo13:08:28

I see I see :o

practicalli-johnny13:08:18

Adding new namespaces works reliably without restarting the REPL, cider-ns-reload or cider-ns-refresh, but I've always stopped/started the REPL when adding a library dependency. cider-restart as I understand it only restarts the connection to the REPL and not the REPL itself. So I use cider-quit and cider-jack-in-clj

practicalli-johnny13:08:38

For example, if you start a REPL from cider-jack-in-clj and evaluate code, after a cider-restart those evaluations will still be there. At least that is what happened when I tested this.

Trung Dinh07:08:20

I use sesman-restart after add dependencies, it works for me

zackteo10:08:39

Ohhhh @U018XDZJ4RG What's sesman actually? :o

practicalli-johnny12:08:39

@UUSQHP535 sesman is the session manager that is used with Cider. It can be used for managing all connections to the REPL. sesman-start provides a menu to choose a Clojure or ClojureScript REPL to jack-in to or connect to. sesman has a browser to show all current connections https://develop.spacemacs.org/layers/+lang/clojure/README.html#managing-repl-connections ,' calls sesman-start in the develop branch of Spacemacs for a while now along with the , m menu for managing connections

zackteo11:08:00

I know I can add them with cljr-add-project-dependency albeit that broke somehow then i restarted emacs. But yeah doing that still doesn't allow me to do (require '[net.cgrand.xforms :as x])