This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-23
Channels
- # adventofcode (135)
- # announcements (9)
- # babashka (27)
- # beginners (97)
- # bristol-clojurians (8)
- # calva (7)
- # chlorine-clover (1)
- # cider (3)
- # clara (16)
- # clj-kondo (9)
- # cljdoc (137)
- # clojars (4)
- # clojure (110)
- # clojure-europe (118)
- # clojure-taiwan (8)
- # clojure-uk (19)
- # clojurescript (30)
- # conjure (6)
- # cryogen (32)
- # datomic (11)
- # depstar (1)
- # duct (4)
- # emacs (6)
- # fulcro (73)
- # graalvm (9)
- # keechma (7)
- # leiningen (16)
- # luminus (1)
- # malli (35)
- # meander (3)
- # off-topic (45)
- # pathom (1)
- # pedestal (2)
- # re-frame (3)
- # reagent (31)
- # reitit (2)
- # reveal (17)
- # shadow-cljs (34)
- # tools-deps (11)
- # xtdb (14)
How do I prevent dev profiles dependencies from being pulled into the pom? I have something like
:profiles
{:test-build {:main foo.bench
:aot :all}
:dev
[:bench :prof :cli
{:source-paths ["analysis"]
:dependencies
[[incanter "1.9.3"]]}]
:cli {:dependencies [[org.clojure/tools.cli "0.4.2"]]}
:bench {:source-paths ["bench"]
:dependencies [[criterium "0.4.5" :scope "provided"]
[org.clojure/test.check "0.9.0"]]}
:prof {:source-paths ["prof"]
:dependencies [[com.clojure-goes-fast/clj-async-profiler "0.4.0"]]}}
but when I run lein pom
those deps are added. another project requires this one and builds an uberjar it will also pull in the dev dependencies. A workaround I found is marking them as provided but that doesn't seem like the right solution, more like abusing a featurei think you can do with-profiles -dev
. ideally you could do with-profile release
without a plus or minus to dictate the single profile. there are a few that default if i remember correctly
i think running lein
pulls in default profiles. i agree that individual tasks should not do this but it happens at the top level before knowing what the task is i bet
It seems weird enough to open a ticket imo. I'll use -dev in the meanwhile, thanks 🙂
looking at the profiles documentation now: In order to prevent profile settings from being propagated to other projects that depend upon yours, the `:default` profiles are removed from your project when generating the pom, jar, and uberjar, and an `:uberjar` profile, if present, is included when creating uberjars. (This can be useful if you want to specify a `:main` namespace for uberjar use without triggering AOT during regular development.) Profiles activated through an explicit `with-profile` invocation will be preserved.