Fork me on GitHub
Marc O'Morain15:12:33

Some test runner improvements:

❤️ 4
calva 3
clojure-spin 2
👀 3
catjam 2

Whoaaaaaa this looks great


If I have the following files:

main.clj    - this references file.clj and utils.clj
files.clj   - this references utils.clj
If I want to load main.clj into my repl, do I have to first remember to eval utils.clj then go and eval files.clj, then finally I can eval main.clj ? Or is their a way to load a file and have it eval all the dependencies too ?


Calva: Load current file and dependencies should handle this. Doesn't it?


I'm a moron, I don't know how I was being blind and never spotted that in the menu. Thank you

Marc O'Morain18:12:15

Does that command work transitively ?


It's cider-nrepl load-file, and I usually only need to run that at the start of a session in some central file. (That’s a “yes, I think so” 😀)

😄 1

It's also how Clojure works, if you require things then Clojure will look them up in the classpath

🙏 1
Marc O'Morain12:12:31

My question is more about tracking changes transitively. Let's say that main.clj requires utils.clj, and until requires http.clj. I edit http.clj and then I run “load current file and dependencies” in main.clj, will Cider detect the transitive dependency that needs to reloaded?


I actually don’t know. Somehow doubt it a bit. It is not easy to follow what happens in nrepl, but it should be easy enough to test. However, my workflow is to first load main.clj, then load any forms as I modify them, so if I change something in http.clj, I don’t have to load main.clj. My change will already be loaded.