tools-deps 2024-10-22

Can someone explain to me why dissoc is used with a vector of keys as the second argument in the https://github.com/clojure/clojure/blob/13a2f67b91ab81cd109ea3152fce1ae76d212453/src/clj/clojure/repl/deps.clj#L46 of add-libs? Thank you.

👍 1
Alex Miller (Clojure team) 2024-10-22T12:00:23.563829Z

yep, certainly a bug, I'll file a patch, thx

👌 1

Because the keys in basis are compound (vectors), if I recall.

I can't see that. user=> (keys (basis/current-basis)) (:paths :deps :aliases :mvn/repos :libs :classpath-roots :classpath :basis-config)

Hmm, no, you're right. That looks almost like it should be (apply dissoc basis [..])

If it were apply dissoc, we'd end up with just (:mvn/repos :libs) as the keys which seems right for a procurer.

I guess it's "harmless" that procurer has all the extra keys... but it does seem like a bug. @alexmiller?

🙏 1

Ah, OK, that explains it. Seems like we found a little bug.

Luckily most Clojure code simply ignores extra keys that it doesn't care about 🙂

That is certainly true.