This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-21
Channels
- # adventofcode (27)
- # announcements (2)
- # babashka (1)
- # beginners (111)
- # calva (11)
- # cider (82)
- # clara (6)
- # clojure (44)
- # clojure-dev (5)
- # clojure-europe (27)
- # clojure-nl (5)
- # clojure-spec (3)
- # clojure-uk (3)
- # clojurescript (29)
- # core-async (5)
- # cursive (4)
- # datalevin (1)
- # datomic (39)
- # exercism (4)
- # figwheel-main (1)
- # fulcro (32)
- # graalvm (7)
- # gratitude (1)
- # integrant (4)
- # jobs (1)
- # lein-figwheel (3)
- # leiningen (4)
- # lsp (3)
- # luminus (3)
- # meander (2)
- # nextjournal (1)
- # off-topic (10)
- # other-languages (26)
- # pathom (14)
- # polylith (9)
- # re-frame (16)
- # remote-jobs (1)
- # shadow-cljs (4)
- # specter (2)
- # sql (6)
- # timbre (2)
- # tools-build (12)
- # xtdb (9)
If I have the following files:
main.clj - this references file.clj and utils.clj
files.clj - this references utils.clj
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 ?I'm a moron, I don't know how I was being blind and never spotted that in the menu. Thank you
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” 😀)
It's also how Clojure works, if you require things then Clojure will look them up in the classpath
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.