tools-build 2024-07-28

feels like clj -X:deps prep needs a --force option to invalidate all the cache stuff or am I missing the options. When it prepares for some git dep and things go south, I have to delete ~/.gitlibs manually?

✅ 1

https://github.com/clojure/clr.tools.deps.cli/blob/a027356ba253977ef6cfc91ba2e98c7b18717826/src/main/clojure/clojure/tools/deps/cli/api.cljc#L49 k, there is a force option indeed.. what's the proper way to discover the cli options other than looking at the source code btw?

clj -h/-?/--help

@highpressurecarsalesm I don't think there are any help pages for -X:deps prep

That link is to the clr version (not jvm) of tools.deps. I can't immediately seem to find if the same thing exists for the jvm cli? I think this might be it:

clj -X:deps prep :action :force 

Somewhat related question: For library that does need prep and that use an :ensure directory under a :deps/prep-lib to indicate "prepped status", is it the library's responsibility to delete that directory in the case that the prep step fails? Or should the user just use the :force mechanism in this case I encountered a library recently where the :ensure directory wasn't being cleaned up when the prep failed and I opened an issue but now I wonder if I should just have used some force mechanism instead

clojure -X:deps help/doc

👍 2

(from memory - I'm on my phone)