Fork me on GitHub
#tools-deps
<
2022-10-18
>
dergutemoritz14:10:18

@alexmiller When trying to figure out how to invoke clojure.tools.deps.alpha/prep-libs! directly, I got confused by its config argument. It appears to be unused and oddly, the prep CLI API function passes the basis function as its value: https://github.com/clojure/tools.deps.alpha/blob/master/src/main/clojure/clojure/tools/cli/api.clj#L102 -- maybe some leftover from a refactoring?

Alex Miller (Clojure team)14:10:16

that is confusing looking but also right

Alex Miller (Clojure team)14:10:12

inside tools.deps, "config" usually refers to the top level procurer config (currently just :mvn/repos and :mvn/local-repo) which is part of the basis

Alex Miller (Clojure team)14:10:42

it's passed through a lot of layers in case it is needed in some future evolution so may be unused in many cases

Alex Miller (Clojure team)14:10:04

pretty much anywhere you see config in those apis, that's what it means

dergutemoritz14:10:19

I see, makes sense!

dergutemoritz14:10:37

So passing the function value of basis is a legit bug then?

Alex Miller (Clojure team)14:10:53

no, that's correct - it is the map containing those keys if they exist

Alex Miller (Clojure team)15:10:08

it contains other stuff too

dergutemoritz15:10:11

Hm? No it's the value of (defn basis ...)

dergutemoritz15:10:20

it used to be shadowed by the destructuring binding of basis which was removed by that commit

dergutemoritz15:10:00

Thanks for the clarifications 🙂

Alex Miller (Clojure team)15:10:02

now I have to remember if I intended to remove it entirely or what I was doing then :)

dergutemoritz15:10:38

Just take a reference of your brain as of that time! 😄

dergutemoritz15:10:53

We need a cybernetic Datomic implant

Alex Miller (Clojure team)15:10:18

pushed fix for next release