This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-07-02
Channels
- # beginners (130)
- # calva (3)
- # cider (13)
- # circleci (1)
- # cljsrn (19)
- # clojure (106)
- # clojure-europe (10)
- # clojure-losangeles (1)
- # clojure-nl (9)
- # clojure-uk (33)
- # clojurescript (16)
- # code-reviews (24)
- # conjure (11)
- # cursive (41)
- # data-science (9)
- # datomic (63)
- # fulcro (19)
- # graphql (12)
- # helix (4)
- # kaocha (2)
- # leiningen (3)
- # malli (8)
- # meander (1)
- # off-topic (17)
- # re-frame (16)
- # reitit (12)
- # sci (32)
- # shadow-cljs (73)
- # spacemacs (31)
- # sql (38)
- # tools-deps (26)
- # xtdb (28)
is there a library that provides lein deps :pedantic :abort
? i.e. looks for and warns on conflicting versions?
you could use -Strace
to create edn file with all that information. but I’m not aware of any tooling to make reading of that file easy
there are a few tools like depot
I’m looking to handle a jarhell situation where I declare dependencies on A and B, and they each declare a dependency on C, but with conflicting versions
You could refernce the conflicting dependency as a top level dependency and decide for a version yourself
Right, but I need to discover conflicts before resolving them. I’d like a tool to detect them and warn before I find out the hard way
but I’d also need to understand how tools.deps resolves that tree. lein’s dependencies are a vector, so deps are ordered sequentially. With a map, how does that work?
but generally the idea is to pick the newest version
but it also picks consistent subtrees (so no child lib should be included if it's parent isn't)
clj -Strace is the best info about what it did and why - the log details each lib/version it looked at (breadth first), what it decided, and why
tools.deps.graph has a tool for using trace.edn files to generate a series of pictures from that that can be somewhat helpful as well
You'll never get an older version than what is required, which eliminates 90% of problems you get with maven. In maven, it's assumed everything is conflicting. Deps assumes that newer things are compatible with older things (so the conflict is picking the older dependency?).
However, the equivalent tool I think would be useful is detecting a top level dependency on an older artefact, when you've bumped the version and it transitively depends on something newer.
If I have a dependency specified in my main deps section and another version of that dependency under an alias, does the alias take precedence when it is active?
Ah, think I found it at https://clojure.org/guides/deps_and_cli. Just use override-deps.
Is there a way to specify a subdirectory when providing git coordinates for a dependency? For example, the git project is foo and within that you have the folders foo-clj and foo-py. deps.edn is in foo-clj. I want to point deps to the foo-clj folder.