tools-build

roklenarcic 2024-05-19T16:49:48.190449Z

When I call create-basis and provide no aliases, does it use aliases that were provided at the command line when running my “tools” build. So if I have build alias that runs build.clj and I run it as -T:build:other does create-basis call in the build.clj pick up on other ? I assume not. Is there a way to run things in my build with all the extra aliases provided at command line?

Alex Miller (Clojure team) 2024-05-19T17:19:59.781599Z

No, it does not

Alex Miller (Clojure team) 2024-05-19T17:20:54.632009Z

If you are using Clojure 1.12 alphas there is a new clojure.java.basis api to obtain the initial basis and the aliases used

roklenarcic 2024-05-19T17:21:19.977209Z

Thank you

Alex Miller (Clojure team) 2024-05-19T17:23:49.212679Z

$ clj -A:test -Sdeps '{:deps {org.clojure/clojure {:mvn/version "1.12.0-alpha11"}}}'
Clojure 1.12.0-alpha11
user=> (require '[clojure.java.basis :as basis])
nil
user=> (-> (basis/initial-basis) :basis-config :aliases)
[:test]

Alex Miller (Clojure team) 2024-05-19T17:24:10.608769Z

and then you could pass that to create-basis

Alex Miller (Clojure team) 2024-05-19T17:24:34.028249Z

note that this will include your :build alias too, but you can strip that out if needed