tools-deps

Eduardo Lopes 2023-05-06T22:25:30.177269Z

What is the most similar command to lein deps? clj -X:deps prep?

2023-05-06T23:00:13.493759Z

Depends on what you think lein deps does

Eduardo Lopes 2023-05-06T23:23:55.706589Z

🤔 I was thinking about downloading project dependencies

2023-05-06T23:39:12.520049Z

I think prep would be fine for that, but I think -P is explicitly for that purpose

✅ 1
2023-05-06T23:41:19.935139Z

A long time ago lein would copy the dependencies jars into your projects directory tree instead of just using them out of m2, which if I recall was what lein deps originally did

practicalli-johnny 2023-05-07T06:38:27.395679Z

clojure -P is the command you are looking for. The -P execution flag can also be used with other aliases via one of the other execution flags, e.g clojure -P -M:test/libs:build/libs to download the main dependencies and those for testing and building a project, as common in a CI workflow https://practical.li/clojure/clojure-cli/execution-options/#prepare-dependencies

Eduardo Lopes 2023-05-07T18:32:32.031419Z

That doc is really awesome, funny that I discovered clojure -P after running clj -h that is not my usual workflow, I prefer reading a doc. Thanks lot, this will be useful for my learning 🙂

👍 2