This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-21
Channels
- # announcements (3)
- # babashka (26)
- # beginners (45)
- # calva (10)
- # chlorine-clover (9)
- # cider (4)
- # clj-kondo (7)
- # cljs-dev (10)
- # clojure (95)
- # clojure-europe (33)
- # clojure-france (5)
- # clojure-nl (3)
- # clojure-spec (2)
- # clojure-sweden (3)
- # clojure-uk (33)
- # clojurescript (54)
- # conjure (101)
- # core-async (14)
- # cursive (1)
- # data-science (91)
- # datascript (3)
- # datomic (16)
- # figwheel (3)
- # figwheel-main (15)
- # fulcro (35)
- # ghostwheel (5)
- # graalvm (13)
- # helix (29)
- # java (5)
- # jobs (6)
- # kaocha (6)
- # leiningen (1)
- # meander (12)
- # off-topic (54)
- # pathom (13)
- # re-frame (16)
- # reagent (8)
- # reitit (4)
- # rum (3)
- # shadow-cljs (49)
- # spacemacs (2)
- # sql (5)
- # tools-deps (10)
- # xtdb (8)
- # yada (3)
Silly question, what does override-deps do that extra-deps doesn't? I realized I've been using extra-deps in my deps.edn when I want to override a dep.
override replaces, extra adds
override does not add
that is, it is ignored if you don't already have the lib
I guess it would be more accurate to say override replaces and extra adds or replaces
further refining... • extra adds new top-level deps (which may effectively replace existing top or transitive deps) • override replaces the version of an existing top or transitive dep
in both cases, you should be guaranteed to get the version you've said - in extra, because it's at the top level, and in override because it replaces at all levels
@dominicm For a concrete use case, we use :override-deps
heavily at work to "pin" versions of libraries across our entire repo. If a particular app doesn't use a given dependency, the :override-deps
does nothing. For deps we expect to be overridden, we specify the coords as just {}
(since they'll be supplied via the override). Does that help?
In a community context: https://github.com/seancorfield/dot-clojure/blob/master/deps.edn#L4-L17 -- those aliases let you pick a specific version of Clojure by overriding whatever would otherwise be pulled in.