Does tools.build have anything similar to badigeon.bundle/bundle (https://github.com/EwenG/badigeon/blob/master/API.md#badigeonbundlebundle)? It dumps all dependency jars and git deps in a directory. Combined with a compile it allows you to run the application with java -cp lib my.app.main
Semi-related to the above question: I tried using clojure.tools.build.api/uber, it does almost the same thing (except I don't really need the manifest or the resulting jar/zipping), but it's very slow. 3min to produce a 42MB jar file. Is this expected, or is something wonky in my setup?
time clj -T:build uberjar
clj -T:build uberjar 35.93s user 26.45s system 33% cpu 3:07.13 total
Code is copy-pasted from the guide, and my project has the following deps:
{org.clojure/clojure {:mvn/version "1.11.1"}
org.clojure/core.async {:mvn/version "1.6.681"}
org.clojure/data.csv {:mvn/version "1.0.1"}
cheshire/cheshire {:mvn/version "5.12.0"}
clj-fuzzy/clj-fuzzy {:mvn/version "0.4.1"}
clj-http/clj-http {:mvn/version "3.13.0"}
com.datomic/peer {:mvn/version "1.0.6726"}
com.github.steffan-westcott/clj-otel-api {:mvn/version "0.2.6"}
;;com.google.cloud/google-cloud-storage {:mvn/version "2.34.0"}
com.magnars/confair {:mvn/version "2024.05.31"}
datomic-type-extensions/datomic-type-extensions {:mvn/version "2024.02.09"}
dev.weavejester/medley {:mvn/version "1.7.0"}
no.cjohansen/clj-nats {:git/url ""
:sha "e580a5eb92d6a130bcd779ecbd5348a7bdee38f0"}
io.rkn/conformity {:mvn/version "0.5.4"}
integrant/integrant {:mvn/version "0.9.0-alpha2"}
java-time-dte/java-time-dte {:mvn/version "2018-04-18"}
java-time-literals/java-time-literals {:mvn/version "2018-04-06"}
lambdaisland/regal {:mvn/version "0.1.175"}
org.osgeo/proj4j {:mvn/version "0.1.0"}
org.slf4j/slf4j-nop {:mvn/version "2.0.9"}
superstring/superstring {:mvn/version "3.2.0"}}
That does seem long but hard to say why
Have seen problems with both slow file systems and virus checkers in the past
Would have to profile to determine more
I see. This is a company Mac, with some amount of corporate malware... I'll try to run it on another laptop to see if that explains the time 😅
The latest version 0.10.4 fixed some missing buffered streams, so make sure you’re on that
This is 0.10.4