leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
teodorlu 2020-06-23T09:14:27.284300Z

Hey! I'm using https://github.com/weavejester/lein-ring uberjar to build my server, using Docker. I'm able to cache some dependencies by calling lein deps before touching my project files. Is there a way to do a call similar to lein deps so that lein ring can cache the dependencies it adds before my own code busts the Docker cache?

teodorlu 2020-06-23T09:17:22.284800Z

Cross posted to #ring .

manas_marthi 2020-06-23T12:49:35.286Z

Hey, did anyone try comparing repl start up time with hotspot jvm vs openj9 jvm?

manas_marthi 2020-06-24T13:05:48.290500Z

I downloaded openj9 from https://adoptopenjdk.net/

manas_marthi 2020-06-24T13:06:10.290800Z

Openj9 claims faster startup. Not sure how to measure it for clojure

jumar 2020-06-24T13:32:10.291Z

as a quick and primitive way you can try:

time clj -e '(print "hello")'

2020-06-23T14:39:39.286200Z

what about lein with-profile +ring deps - that should calculate all the lein-ring classpath before running deps

teodorlu 2020-06-23T15:18:59.288Z

Thanks for the suggestion! Running lein with-profile +ring deps doesn't seem to include all the dependencies, though.

Sending build context to Docker daemon  156.4MB
Step 1/8 : FROM clojure:openjdk-11-lein
 ---> ba3af885faf6
Step 2/8 : WORKDIR /app
 ---> Using cache
 ---> 09f838d2f393
Step 3/8 : ADD project.clj ./
 ---> d60445fb9b66
Step 4/8 : RUN lein with-profile +ring deps
 ---> Running in 678edcd00a2b
Retrieving lein-ring/lein-ring/0.12.5/lein-ring-0.12.5.pom from clojars
Retrieving org/clojure/core.unify/0.5.7/core.unify-0.5.7.pom from central
Retrieving org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from central
Retrieving org/sonatype/oss/oss-parent/7/oss-parent-7.pom from central
...
Retrieving ring/ring-mock/0.4.0/ring-mock-0.4.0.jar from clojars
Retrieving ring/ring-defaults/0.3.2/ring-defaults-0.3.2.jar from clojars
Removing intermediate container 678edcd00a2b
 ---> 139216aadc67
Step 5/8 : COPY src/ ./src/
 ---> a184583a5fa8
Step 6/8 : COPY resources/ ./resources/
 ---> eae8c20394fe
Step 7/8 : RUN lein ring uberjar
 ---> Running in 04f1250852ab
Retrieving ring-server/ring-server/0.5.0/ring-server-0.5.0.pom from clojars
Retrieving ring/ring/1.3.2/ring-1.3.2.pom from clojars
Retrieving ring/ring-core/1.3.2/ring-core-1.3.2.pom from clojars
...

jumar 2020-06-23T18:03:08.290200Z

Do you have Openj9 installed? do you observe/expect a different startup time?