I believe it's /path/to/graal/Contents/Home/bin/gu
@katox merged, thanks
now for your babashka compilation problem: have you solved this too?
no, let's move to a proper forum .)
we can do in private.
for the record, the error was cloning the repo without --recursive
, thanks!
I think all the ingredients for an all native deps.edn / tools.deps CLI are there now: https://github.com/borkdude/tools-deps-native-experiment/tree/shell#shell-branch This + deps.clj = no JVM for dep resolution / downloading, just JVM for REPL / running of apps / bytecode AOT compilation
Will wait a bit for the shell approach to appear properly in tools.deps.alpha.
What do we win with this? Maybe a bit questionable to go through these hoops, but: - startup time for downloading deps - running this is about as fast with caching of the CLI as it is without, if the deps are already there - could be used in babashka to decouple downloading of scripting deps from a JVM
what percentage of execution time is startup vs. downloading deps?
it depends on how many deps you have
and how fast your network is
and how much is in your cache :)
I will do a small test locally with only medley
300ms vs 3000ms
(with medley and .cpcache removed from local caches)
The comparison wasn't entirely fair because I ran clojure
in my tools-deps-native project which had more deps so calculating the classpath would take more time. Better comparison:
$ time ./tools-deps-native '{:deps {medley/medley {:mvn/version "1.3.0"}}}'
Downloading: medley/medley/1.3.0/medley-1.3.0.pom from clojars
Downloading: medley/medley/1.3.0/medley-1.3.0.jar from clojars
"/Users/borkdude/.m2/repository/medley/medley/1.3.0/medley-1.3.0.jar:/Users/borkdude/.m2/repository/org/clojure/clojure/1.9.0/clojure-1.9.0.jar:/Users/borkdude/.m2/repository/org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar:/Users/borkdude/.m2/repository/org/clojure/spec.alpha/0.1.143/spec.alpha-0.1.143.jar"
./tools-deps-native '{:deps {medley/medley {:mvn/version "1.3.0"}}}' 0.05s user 0.03s system 27% cpu 0.300 total
$ (cd /tmp; time clojure -Spath -Sdeps '{:deps {medley/medley {:mvn/version "1.3.0"}}}')
Downloading: medley/medley/1.3.0/medley-1.3.0.pom from clojars
Downloading: medley/medley/1.3.0/medley-1.3.0.jar from clojars
src:/Users/borkdude/.m2/repository/medley/medley/1.3.0/medley-1.3.0.jar:/Users/borkdude/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar:/Users/borkdude/.m2/repository/org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar:/Users/borkdude/.m2/repository/org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar
clojure -Spath -Sdeps '{:deps {medley/medley {:mvn/version "1.3.0"}}}' 7.88s user 0.40s system 336% cpu 2.464 total
Update regarding tools-deps-native. The GraalVM problems have now vanished due to getting rid of Jsch.
The startup time + downloading medley with clojure
at 1.10.2.801 (which doesn't use JSch anymore) also seems to have improved a little, now down to 2s compared to 2.5s above