This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-03
Channels
- # announcements (2)
- # babashka (154)
- # beginners (63)
- # calva (4)
- # cider (2)
- # clara (19)
- # clj-kondo (94)
- # cljfx (8)
- # cljs-dev (6)
- # clojars (2)
- # clojure (82)
- # clojure-australia (1)
- # clojure-europe (134)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-serbia (11)
- # clojure-taiwan (1)
- # clojure-uk (39)
- # clojurescript (83)
- # community-development (108)
- # conjure (10)
- # cursive (32)
- # data-oriented-programming (1)
- # datomic (22)
- # defnpodcast (9)
- # depstar (4)
- # docker (3)
- # events (3)
- # figwheel-main (2)
- # funcool (9)
- # graalvm (19)
- # honeysql (23)
- # jackdaw (4)
- # jobs (4)
- # jobs-discuss (2)
- # kaocha (24)
- # leiningen (1)
- # lsp (12)
- # membrane (6)
- # off-topic (21)
- # pathom (13)
- # polylith (1)
- # releases (7)
- # remote-jobs (2)
- # reveal (8)
- # ring (7)
- # sci (2)
- # shadow-cljs (9)
- # sql (10)
- # tools-deps (21)
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
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
and how much is in your cache :)
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