tools-build

seancorfield 2021-11-19T22:44:29.249600Z

Friday win: today we replaced half our ancient ant build.xml and snapshot.sh scripts with a couple of tools.build-based functions! (the rest of that mess deals specifically with our legacy apps which will eventually get replaced by shiny Clojure 🙂 )

Alex Miller (Clojure team) 2021-11-19T23:29:08.249800Z

Nice!

ericdallo 2021-11-19T02:30:32.246700Z

I have a function like:

(defn tag [{:keys [version]}] ...)
And when I try clj -T:build tag :version "1.2.3" it gives me a Unreadable arg: "1.2.3" , am I missing something? I didn't find a example on tools.build guide passing anything other than a keyword so not sure if that is suppose to work

ericdallo 2021-11-19T02:36:17.246900Z

It works if I pass clj -T:build tag :version :1.2.3 but it looks a little bit weird

Alex Miller (Clojure team) 2021-11-19T03:07:57.247100Z

when passing strings, you need to include the outer quotes in the literal value

Alex Miller (Clojure team) 2021-11-19T03:08:14.247300Z

clj -T:build tag :version '"1.2.3"'

Alex Miller (Clojure team) 2021-11-19T03:09:01.247500Z

https://clojure.org/reference/deps_and_cli#quoting

ericdallo 2021-11-19T03:11:57.247700Z

Oh, I missed that, thank you! it works