This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-03-06
Channels
- # babashka (60)
- # beginners (36)
- # clj-kondo (29)
- # clojure (91)
- # clojure-dev (18)
- # clojure-europe (12)
- # clojure-nl (1)
- # clojure-norway (11)
- # clojure-uk (5)
- # clojuredesign-podcast (8)
- # clojurescript (40)
- # core-typed (74)
- # data-science (8)
- # datomic (9)
- # emacs (22)
- # events (5)
- # fulcro (56)
- # gratitude (3)
- # hyperfiddle (11)
- # lsp (6)
- # malli (36)
- # meander (23)
- # off-topic (50)
- # polylith (4)
- # portal (10)
- # reitit (4)
- # schema (1)
- # shadow-cljs (66)
- # squint (3)
- # tools-deps (16)
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.
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)))