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
I use sesman-restart after add dependencies, it works for me
Ohhhh @trung What's sesman actually? :o
https://metaredux.com/posts/2019/11/07/hard-cider-hard-restart.html here you go
@zackteo 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
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])
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.
@jr0cket I was looking at your guide actually https://practicalli.github.io/spacemacs/refactor/clj-refactor/managing-library-dependencies.html
does cider-restart
usually work? 😮
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.
I see I see :o
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
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.