tools-build

Eugen 2021-09-07T10:48:47.087900Z

is there any interest to provide an unzip next to zip https://github.com/clojure/tools.build/blob/master/src/main/clojure/clojure/tools/build/tasks/zip.clj ?

Alex Miller (Clojure team) 2021-09-07T10:54:28.089Z

Sure, there actually is one buried in the utils, just need to clean up the api etc

borkdude 2021-09-07T11:00:09.089400Z

@eugen.stan fwiw I've also got one here, which you can copy over if you want. https://github.com/borkdude/glam/blob/b1d59a5c67aa6ca1e5d04340d4b1c0bc60e8c6a6/src/glam/impl/impl.clj#L35

Eugen 2021-09-07T11:01:55.090Z

thanks to both, I will do that until there is one in tools.build

Eugen 2021-09-07T11:05:05.090900Z

@alexmiller: do you have time to work on that? should I give it a try?

Alex Miller (Clojure team) 2021-09-07T11:11:13.091300Z

I'll see if I can add it pretty quickly

Alex Miller (Clojure team) 2021-09-07T11:11:43.091800Z

you can also always just use the process task to shell out, which is pretty easy https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-process

Eugen 2021-09-07T11:14:25.092600Z

I adapted @borkdude’s version and works great

Alex Miller (Clojure team) 2021-09-07T11:14:42.092900Z

(b/process {:dir "target" :command-args ["unzip" "my.zip"]})

👍 1
Eugen 2021-09-07T11:15:07.093600Z

I will need to have unzip locally

borkdude 2021-09-07T11:15:17.093900Z

this is what I've been doing as well, but perhaps it's better to not rely on unzip to be installed, which isn't always the case, certainly not on Windows for example

👍 1
borkdude 2021-09-07T11:15:35.094200Z

or some Alpine images / aarch64 devices

borkdude 2021-09-07T11:16:58.094800Z

tar.gz is a better bet in this regard: tar seems to be available also on the above mentioned platforms (while tar doesn't have a built in JDK support, so shelling out is needed there, if you don't want to bring in libs)

Alex Miller (Clojure team) 2021-09-07T11:47:42.095500Z

I've added in io.github.clojure/tools.build {:git/tag "v0.2.2" :git/sha "3049217"}

❤️ 2
Alex Miller (Clojure team) 2021-09-07T11:47:59.095700Z

https://clojure.github.io/tools.build/clojure.tools.build.api.html#var-unzip

seancorfield 2021-09-07T16:54:26.097300Z

And io.github.seancorfield/build-clj {:git/tag "v0.1.3" :git/sha "26b884c"} is available with the tools.build dep bumped to v0.2.2 -- thanks for the continued, swift work on tools.build!

1