leiningen

N.B. The maintainers are on #leiningen on Libera chat IRC. Go there for direct support/bug reports.
nitaai 2019-06-05T10:44:31.002800Z

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.

2019-06-05T15:04:21.003400Z

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

2019-06-05T15:04:56.004Z

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

2019-06-05T15:05:50.004800Z

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

nitaai 2019-06-06T08:09:09.009700Z

@mikerod hehe 🤝

nitaai 2019-06-05T15:08:11.004900Z

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

nitaai 2019-06-05T15:10:55.005500Z

nitaai 2019-06-05T15:11:28.005900Z

2019-06-05T15:13:05.006300Z

@matuskmit1 I think I know why

2019-06-05T15:13:15.006500Z

if you use :joint somewhere else

2019-06-05T15:13:23.006700Z

Make sure the composite profile is not only keywords

nitaai 2019-06-05T15:13:26.006900Z

this does not work.

2019-06-05T15:14:02.007100Z

eg. it needs to be like

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

2019-06-05T15:14:12.007300Z

and let me know if that changes things

nitaai 2019-06-05T15:15:37.007500Z

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

nitaai 2019-06-05T15:16:06.007700Z

weird, but thanks!

2019-06-05T15:33:46.008Z

Ok, I have a Leininge github issue

2019-06-05T18:00:58.008200Z

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

2019-06-05T18:01:08.008400Z

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

2019-06-05T18:01:26.008600Z

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

2019-06-05T18:36:37.008800Z

@matuskmit1 heres’ the issue related to this topic: https://github.com/technomancy/leiningen/issues/2393#issuecomment-499122448

2019-06-05T18:36:58.009100Z

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