tools-deps

borkdude 2024-07-30T08:50:50.828429Z

Is this expected to not work?

$ clj -Sdeps '{:deps {io.github.IGJoshua/coffi {:git/sha "917141b6a2cea4f4c556f5a54c51c5688c5b5590"}}}' -X:deps prep
Error building classpath. The following libs must be prepared before use: [io.github.IGJoshua/coffi]

2024-07-30T10:31:41.682329Z

It's because of this https://github.com/IGJoshua/coffi/issues/10

🙏 1
2024-07-30T10:33:46.732019Z

Although what you posted seems like the "normal behavior" I think

Alex Miller (Clojure team) 2024-07-30T12:54:05.160179Z

You should be able to use :force flag to force prep too

borkdude 2024-07-30T13:00:13.117909Z

This isn't specific to coffi. My question more specifically is about the combination of -Sdeps and prep:

$ clj -Sdeps '{:deps {http-kit/http-kit {:git/url "" :git/sha "48b6206516fe6c4856ab0cccf69daf22678ff0cb"}}}' -X:deps prep
Error building classpath. The following libs must be prepared before use: [http-kit/http-kit]

Alex Miller (Clojure team) 2024-07-30T13:01:35.034389Z

Ah, right - no it should not work. When calling -X:deps prep you need to pass any extra deps via :extra arg

Alex Miller (Clojure team) 2024-07-30T13:02:38.052049Z

-Sdeps is added for running the prep program but that’s not what you mean here, presumably you want that in the basis prep creates

borkdude 2024-07-30T13:04:41.024969Z

Ah got it. Where I came from: I wanted tools deps to download a git dep, just to see what files ended up on my machine, but I had to go through the prep hoop

Alex Miller (Clojure team) 2024-07-30T13:04:46.724689Z

Generally true for all the :deps programs that create a basis, like tree etc

borkdude 2024-07-30T13:04:59.323779Z

I wasn't interested in creating a project with this dep, this is why I tried it with Sdeps

dpsutton 2024-07-30T14:34:47.346289Z

I was going to make an http://ask.clojure.org question about this, but i actually cannot think of the terms to google so i’m gonna ask here instead. I often want to use the function that lists the documentation for functions but I can never remember it’s syntax or even it’s name. It’s something like clj -X:deps help/fn :fn foo or something like that. I always check clj --help but it’s not listed in there, so I google it and hope to stumble on it. But it’s very close to generic “help me” terms so it takes me a while to find it. Would it be possible to get this added to clj --help? I’ll make a request on http://ask.clojure.org once i can remember the name of it

dpsutton 2024-07-30T14:36:07.283079Z

context: i want to list the deps in our project in edn format. I know from searching slack that the invocation is clj -X:deps list :aliases '[:ee :drivers]' :license :full, but I don’t know how to change the output. And I’d love to check it’s documentation, but I need documentation on checking documentation 🙂

Alex Miller (Clojure team) 2024-07-30T14:50:29.506159Z

I would actually instead like to do the work to make it easier in the first place (and document that) and that is on my radar behind some other things

dpsutton 2024-07-30T14:50:53.450149Z

that sounds great. glad to know this is on your radar

Alex Miller (Clojure team) 2024-07-30T14:51:25.219449Z

for the :deps programs, https://clojure.github.io/tools.deps.cli can also help (and this is linked in the docs at least)

🙏 1