leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
haywood 2021-04-22T14:38:14.081600Z

👋: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?

2021-04-22T15:11:43.082400Z

in my experience adding more jars / configs with different subsets of jars tends to lead to errors and slow down processes

2021-04-22T15:12:14.083Z

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

Clément Ronzon 2021-04-22T21:34:16.085400Z

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 ?

2021-04-23T13:32:55.086400Z

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.

2021-04-23T13:33:50.086600Z

also it's less demanding on your container resources in your prod environment

Clément Ronzon 2021-04-26T15:01:01.091500Z

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!