Fork me on GitHub
#leiningen
<
2017-11-09
>
lmergen19:11:26

when invoking lein deps on multiple projects on the same machine in parallel, can anyone tell me whether or not shared dependencies will be downloaded multiple times, or does lein (maven?) do some kind of "just in time" resolution where (most of the time, apart from race conditions) the deps will be downloaded only once ?

lmergen19:11:06

this is for a build / CI server doing a clean build, where i'm invoking this command on 4 projects at the same time

danielcompton19:11:45

Maven is smart enough to check if the dependencies exist before downloading them

danielcompton19:11:02

You will have the possibility of race conditions of course

danielcompton19:11:38

One thing I’m not sure about is how wide the race window is, i.e. when does Maven-resolver decide that it needs to download something?

danielcompton19:11:30

If you’re concerned about this, you can use :local-repo for each project to have a local m2 cache for each project

gfredericks21:11:01

is there a straightforward way for a lein plugin to add things to the :dev profile?

gfredericks21:11:05

or something equivalent?

gfredericks21:11:40

e.g., if I want to add a dependency to everywhere the :dev profile is used, but not have it affect the :uberjar task

gfredericks21:11:10

using a middleware and doing (-> project (update-in [:profiles :dev :dependencies] ...)) seems to be a no-op, I'm guessing because the dev profile's already been read at that point or something

gfredericks21:11:43

my workaround is to put the plugin itself in the dev profile

gfredericks21:11:59

maybe that's actually a good thing? I dunno

danielcompton22:11:55

Hmm, is a bit tricky for timing and stages though