Fork me on GitHub
#leiningen
<
2019-06-05
>
nitaai10:06:31

hello. i have a question in regards to profiles merging. my example:

:profiles {:joint {:dependencies [[camel-snake-kebab "0.4.0"]
                                    [cider-ci/open-session "2.0.0-beta.1"]
                                    [clj-http "3.8.0"]
                                    [clojure-humanize "0.2.2"]
                                    [clj-pid "0.1.2"]
                                    [com.github.mfornos/humanize-slim "1.2.2"]
                                    [com.walmartlabs/lacinia "0.31.0"]
                                    [environ "1.1.0"]
                                    [hickory "0.7.1"]
                                    [inflections "0.13.0"]
                                    [org.clojure/clojure "1.9.0"]
                                    [org.clojure/tools.cli "0.3.5"]
                                    [org.clojure/tools.nrepl "0.2.13"]
                                    [org.clojure/clojure-contrib "1.2.0"]
                                    [timothypratley/patchin "0.3.5"]
                                    [threatgrid/ring-graphql-ui "0.1.1"]
                                    [uritemplate-clj "1.1.1"]]},
             :uberjar [:joint :uberjar-extra],
             :uberjar-extra {:source-paths ["src/prod"],
                             :resource-paths ["resources/prod"],
                             :aot [#"leihs\..*"],
                             :uberjar-name "leihs-procure.jar"}}
now lein uberjar is complaining about missing classes of the dependencies of :joint profile. why is it? note: i don’t want to put the :joint dependencies as the projects top-level :dependencies as those are already used for shared dependencies between different projects and i need to have the possibility to override them if necessary.

mikerod15:06:21

@matuskmit1 hmm what do you see with lein with-profile uberjar pprint and/or lein with-profile uberjar classpath

mikerod15:06:56

Also, a quick thing to try would be to change the profile :uberjar definition to instead be this :uberjar [:joint :uberjar-extra {}] I’d be curious if that affected this

nitaai15:06:26

this does not work.

mikerod18:06:26

yes, was wrong approach, but we resolved in later chain

mikerod15:06:50

Lastly, are :joint and/or :uberjar-extra used in any other composite profiles - such as :dev?

nitaai15:06:11

yes, :joint is. good question, because when i cleared everything from :profiles upto :joint, :uberjar, :uberjar-extra then it worked…

mikerod15:06:05

@matuskmit1 I think I know why

mikerod15:06:15

if you use :joint somewhere else

mikerod15:06:23

Make sure the composite profile is not only keywords

mikerod15:06:02

eg. it needs to be like

:dev [:joint {}]
NOT like
:dev [:joint]

mikerod15:06:12

and let me know if that changes things

nitaai15:06:37

oh, yes. adding {} to every composite profile works.

nitaai15:06:06

weird, but thanks!

mikerod15:06:46

Ok, I have a Leininge github issue

mikerod18:06:58

this helped remind me of a problem I had a generalized issue for

mikerod18:06:08

I’m going to log this explanation of how it affects this there, will add link

mikerod18:06:58

it’s funny because I logged this long ago, and recently had glts ask me about what problem I faced and I forgot. I remembered once I see you bring this up today. Win