tools-build

hanDerPeder 2025-09-22T19:59:10.701589Z

I'm making a tool that can be installed, but it has a dependency that needs prep. how do I do that?

Alex Miller (Clojure team) 2025-09-22T20:00:43.926379Z

the prep action will prep all dependencies in the tree

Alex Miller (Clojure team) 2025-09-22T20:01:22.318269Z

or do you mean how to prep a tool

hanDerPeder 2025-09-22T20:02:35.695459Z

yes, I'm making this tool: https://github.com/anteoas/eden which depends on another lib: https://github.com/anteoas/hawkeye which needs prep

Alex Miller (Clojure team) 2025-09-22T20:03:50.895029Z

so consumers will just need to declare their alias using eden (say :eden), then call clj -X:deps prep :aliases '[:eden]'

hanDerPeder 2025-09-22T20:04:06.187879Z

trying to get it working in gh actions

clojure -Ttools install io.github.anteoas/eden \
  '{:git/url "" :git/tag "v2025.08.19"}' \
  :as eden
then
clojure -Teden build
fails with
Error building classpath. The following libs must be prepared before use: [io.github.anteoas/hawkeye]

Alex Miller (Clojure team) 2025-09-22T20:04:40.084279Z

if you're using a named tool ...

hanDerPeder 2025-09-22T20:05:14.524569Z

aha,

Alex Miller (Clojure team) 2025-09-22T20:05:32.255089Z

that may still be an outstanding issue

hanDerPeder 2025-09-22T20:06:00.825149Z

so this then:

- name: Install Eden tool
        run: clojure -Ttools install io.github.anteoas/eden '{:git/tag "v2025.09.22"}' :as eden

      - name: Prep Eden tool
        run: clojure -X:deps prep :aliases '[:eden]'

Alex Miller (Clojure team) 2025-09-22T20:07:09.150349Z

if you have an eden alias, or you can be more explicit like:

clj -X:deps prep :extra '{:deps {io.github.anteoas/eden {:git/tag "v2025.09.22"}}}'

Alex Miller (Clojure team) 2025-09-22T20:11:23.262619Z

I've added a ticket for this at https://clojure.atlassian.net/browse/TDEPS-272

hanDerPeder 2025-09-22T20:15:33.011259Z

cool! got it working now. thanks prepping named tools would indeed be nice! my thought with this was to get close to something like npm install -g eden , but I totally see the benefits of having a discrete step for "let this thing run arbitrary code".

Alex Miller (Clojure team) 2025-09-22T20:34:53.689329Z

yeah, that is by design

Alex Miller (Clojure team) 2025-09-22T21:34:37.036499Z

https://clojurians.slack.com/archives/C06MAR553/p1758576862436119

1
1
🤘 1