cider

A channel dedicated to the Clojure Interactive Development Environment that Rocks (aka CIDER). :cider:
zackteo 2020-08-17T11:33:45.048400Z

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

Trung Dinh 2020-08-18T07:46:20.052300Z

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

zackteo 2020-08-18T10:19:39.055Z

Ohhhh @trung What's sesman actually? :o

Trung Dinh 2020-08-18T12:15:17.063300Z

https://metaredux.com/posts/2019/11/07/hard-cider-hard-restart.html here you go

practicalli-john 2020-08-18T12:16:39.063600Z

@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

zackteo 2020-08-17T11:41:00.050100Z

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])

practicalli-john 2020-08-17T12:13:55.050200Z

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.

zackteo 2020-08-17T12:14:55.050400Z

@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? 😮

practicalli-john 2020-08-17T12:54:25.050700Z

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.

zackteo 2020-08-17T13:03:28.050900Z

I see I see :o

practicalli-john 2020-08-17T13:28:18.051100Z

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-john 2020-08-17T13:28:38.051300Z

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.