tools-deps

danielsz 2024-10-22T05:07:46.517969Z

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
Alex Miller (Clojure team) 2024-10-22T12:16:27.846119Z

https://clojure.atlassian.net/browse/CLJ-2886

👌 1
seancorfield 2024-10-22T05:08:48.543839Z

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

danielsz 2024-10-22T05:11:11.342669Z

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

seancorfield 2024-10-22T05:13:10.131739Z

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

seancorfield 2024-10-22T05:14:15.491389Z

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

seancorfield 2024-10-22T05:15:12.759389Z

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

🙏 1
danielsz 2024-10-22T05:15:15.252109Z

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

seancorfield 2024-10-22T05:15:49.301939Z

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

danielsz 2024-10-22T05:16:12.436459Z

That is certainly true.