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)
you want an alias that includes extra classpaths and then have cider use that alias when jacking in
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 startupat 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
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
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.
(I'm trying to convert a lein project to deps.edn)