Fork me on GitHub
#tools-deps
<
2021-10-27
>
seancorfield16:10:23

I figured this was worth sharing from the announcements thread since I feel like not many people know how to get help on "tools"...

seancorfield16:10:38

...and for a specific tool:

seancorfield16:10:29

And for getting help on deps itself:

(! 654)-> clojure -X:deps help/doc
This api provides functions that can be executed from the Clojure tools using -X:deps.

-------------------------
clojure.tools.cli.api/basis
([params])
  Create a basis from a set of deps sources and a set of aliases. By default, use
  root, user, and project deps and no argmaps (essentially the same classpath you get by
  default from the Clojure CLI).
...

Alex Miller (Clojure team)16:10:36

while that's all true, it's less obvious and discoverable than it should be so my sympathy is with the OP

seancorfield17:10:19

Oh, totally. That's why I figured I'd share it because it isn't "obvious" even though it is mentioned (briefly) in the docs.

seancorfield17:10:29

I've added a comment to all my build.clj files saying how to get help on the build file and I also add this to the README on my tools (e.g., deps-new). It's super useful. Maybe the install function could print how to get help on a newly installed tool? And maybe list could also mention it?

seancorfield17:10:04

Perhaps both commands could also give an example of the show function too? I nearly always forget it needs :tool the first time I type it in:

(! 656)-> clojure -Ttools show new
Key is missing value: new
(! 657)-> clojure -Ttools show :tool new
{:lib io.github.seancorfield/deps-new,
 :coord
 {:git/tag "v0.4.0",
  :git/sha "0fb18a62fe068a2b62183c93e5441ababdd7bc6f",
  :git/url ""}}
Default namespace:  org.corfield.new

Alex Miller (Clojure team)17:10:24

as always, would love any suggestions to go to https://ask.clojure.org

Alex Miller (Clojure team)17:10:37

or to clojure-site issues if doc requests

seancorfield17:10:54

Yup, on it. Will submit an "ask" with the above notes!