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.@matuskmit1 hmm what do you see with lein with-profile uberjar pprint
and/or lein with-profile uberjar classpath
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
Lastly, are :joint
and/or :uberjar-extra
used in any other composite profiles - such as :dev
?
@mikerod hehe 🤝
yes, :joint
is. good question, because when i cleared everything from :profiles
upto :joint, :uberjar, :uberjar-extra
then it worked…
@matuskmit1 I think I know why
if you use :joint
somewhere else
Make sure the composite profile is not only keywords
this does not work.
eg. it needs to be like
:dev [:joint {}]
NOT like
:dev [:joint]
and let me know if that changes things
oh, yes. adding {}
to every composite profile works.
weird, but thanks!
Ok, I have a Leininge github issue
this helped remind me of a problem I had a generalized issue for
I’m going to log this explanation of how it affects this there, will add link
yes, was wrong approach, but we resolved in later chain
@matuskmit1 heres’ the issue related to this topic: https://github.com/technomancy/leiningen/issues/2393#issuecomment-499122448
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