cider

2025-08-07T20:46:18.106229Z

Is there a way, in deps.edn, to customise the classpath when Cider jacks in? I can't seem to run my tests with "Run all project tests" which I believe is because the test dir is not on the classpath. But I don't want to always have test on the classpath, do I? (at the moment I'm adding it via an alias as recommended in the clojure docs (https://clojure.org/guides/deps_and_cli#test_runner)

dpsutton 2025-08-07T20:55:54.451879Z

you want an alias that includes extra classpaths and then have cider use that alias when jacking in

dpsutton 2025-08-07T20:57:13.245469Z

https://docs.cider.mx/cider/cljs/shadow-cljs.html#using-shadow-cljs-with-deps-edn-and-custom-repl-initialization here’s an example in the docs where they add a :dev alias to add stuff to the classpath (folders or deps, all the same) and then set `

cider-clojure-cli-aliases
to include these aliases at startup

➕ 1
dpsutton 2025-08-07T20:57:35.761119Z

at the very least, you can use a prefix argument at jack-in to be able to customize the startup command to easily add whatever one-off aliases you want

Matti Uusitalo 2025-08-08T10:47:39.093829Z

Recommend using .dir-locals for this https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html Probably covered in the cider docs too

2025-08-09T11:01:37.285399Z

Thank you both, that's very helpful. I thought that having a test directory was the normal thing to do, and therefore setting up the test runner would be built-in somehow.

2025-08-07T20:46:47.918939Z

(I'm trying to convert a lein project to deps.edn)