👋:skin-tone-2: hey gang, wanted to see if I’m thinking about this correctly. I have a clojure codebase and I want to add a couple .cljc
namespaces to it and create a jar that only includes those namespaces using a separate profile for consumption as a library in a clojurescript project. Is that necessary or should I just create a single jar for the whole thing?
in my experience adding more jars / configs with different subsets of jars tends to lead to errors and slow down processes
and what do you gain? there aren't files in the jar that you don't use in one app - that's a small benefit for the added work and fragility IMHO
Hey gals and guys,
After setting up a Docker container based on clojure:openjdk-11-lein
I am able to run lein
commands such as lein ancient
, lein repl
and such.
Nevertheless It seems that the first time I run those lein commands it downloads the dependencies for each and every different commands (`lein ancient`, lein repl
, lein test-refresh
etc.).
Is there an explanation for that behavior? Is it possible to prevent the download of the same deps multiple times to save bandwidth and time ?
IMHO the superior option is not to run lein inside docker (unless the container is only for CI jar building) and instead use lein to build a jar, and use that jar from docker. This eliminates other complexities like pre-populating / reusing the m2 cache and eliminates a variety of transient / situational failures to reproduce behavior.
also it's less demanding on your container resources in your prod environment
Thank you @andy.fingerhut and @noisesmith!
The container is for dev env. only. The ~/.m2
dir is mapped to a volume so the cache is not lost between container's ups and downs. You are right @andy.fingerhut, it happens only the first time the lein commands are ran.
In any case this is not a big deal, I was just curious.
Thanks again!