leiningen

brandonvin 2022-02-10T00:23:38.880029Z

I'm trying to set up a lein project to build two different uberjars, each using different versions of the same dependencies. Currently I've got something like:

:profiles
{:version-1 {:dependencies [[external-lib "1.0.0"]]}
 :version-2 {:dependencies [[external-lib "2.0.0"]]}}
The first surprise is that lein with-profile +version-1 uberjar fails to compile, because the classes from external-lib aren't available during compilation. Through trial and error, I've found that adding ^:leaky metadata to the profiles allows lein with-profile +version-1 uberjar to succeed, but then there's another surprise: the classes from external-lib are actually not included in the uberjar. Is there a way to do this in lein?

2022-02-10T02:48:01.750389Z

Are you using AOT?

2022-02-10T02:48:17.071409Z

I'd expect leaky to be all you need

2022-02-10T02:48:23.754219Z

From what you have said

2022-02-10T02:48:54.159009Z

You can try adding DEBUG=true prior to the lein command and see if you can get any more details