tools-deps

tengstrand 2024-03-06T04:43:16.852669Z

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.

dominicm 2024-03-06T05:05:19.737499Z

I just woke up answer: I vaguely recall there being an environment variable which controls this

seancorfield 2024-03-06T05:59:23.100859Z

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?

tengstrand 2024-03-06T06:25:15.597469Z

This could be convenient to have when I test different configurations, but is not super important.

dominicm 2024-03-06T07:44:15.910559Z

You're probably right... One option is to use -Sdeps

dominicm 2024-03-06T07:45:39.370369Z

https://github.com/juxt/pack.alpha/pull/34#issuecomment-479209839 me 5 years ago

tengstrand 2024-03-06T07:51:58.699379Z

Okay, cool, will try that out. Thank!

twashing 2024-03-06T18:13:37.931199Z

Is there a way to control the order of dependencies? Especially deps introduced in :extra-deps in the :aliases section.

Alex Miller (Clojure team) 2024-03-06T18:24:38.902549Z

dependencies should be disjoint and thus, the order should not matter

Alex Miller (Clojure team) 2024-03-06T18:25:05.359849Z

if that's not true - why?

twashing 2024-03-06T19:49:48.540269Z

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.

Alex Miller (Clojure team) 2024-03-06T19:57:52.576449Z

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?

Alex Miller (Clojure team) 2024-03-06T19:58:56.899659Z

Really, I’d say it’s a bug in cider if they are taking this capability away from you

twashing 2024-03-06T21:02:13.823429Z

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)))

twashing 2024-03-06T21:02:21.981729Z

Cheers 👍🏿

🍻 1