When I execute e.g. clojure -M:poly it will use ./deps.edn . Can I tell it to use e.g. ./deps2.edn instead? Couldn't find anything about it in the documentation.
I just woke up answer: I vaguely recall there being an environment variable which controls this
There's an env var that specifies the path to the user folder (for the "user" deps.edn) but I don't think you can change the name of the deps.edn file that is read?
This could be convenient to have when I test different configurations, but is not super important.
You're probably right... One option is to use -Sdeps
https://github.com/juxt/pack.alpha/pull/34#issuecomment-479209839 me 5 years ago
Okay, cool, will try that out. Thank!
Is there a way to control the order of dependencies?
Especially deps introduced in :extra-deps in the :aliases section.
dependencies should be disjoint and thus, the order should not matter
if that's not true - why?
I agreed, I’m trying to worm my way to a solution, lol.
This relates to my question in #clojure. In this particular use case, cider/cider-nrepl has its own data_readers.clj which is preceding the custom one we’ve created… but only in a REPL environment. And I’m going through all these contortions, because I don’t want to rename our default data_readers.clj just for the REPL.
But I don’t think I have a choice here. I’m just going to do what you suggested in https://clojurians.slack.com/archives/C03S1KBA2/p1709749448615029?thread_ts=1709749342.395009&cid=C03S1KBA2.
All the data-reader.clj files on the classpath are loaded, so is this a case where you are trying to change an existing reader mapping?
Really, I’d say it’s a bug in cider if they are taking this capability away from you
Finally got it. You were right… Our reader tag was in clojure.core/*data-readers*. Our reader tag now works at the REPL and reading edn.
But I needed to pass clojure.core/*data-readers* to clojure.edn/read-string.
(let [opts {:readers (merge clojure.core/default-data-readers
clojure.core/*data-readers*)}]
(->> config
resource
slurp
(clojure.edn/read-string opts)))Cheers 👍🏿