This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-08-25
Channels
- # admin-announcements (3)
- # alda (2)
- # beginners (10)
- # boot (44)
- # cider (31)
- # cljs-dev (5)
- # cljsjs (2)
- # cljsrn (17)
- # clojure (181)
- # clojure-austin (2)
- # clojure-brasil (18)
- # clojure-canada (1)
- # clojure-conj (5)
- # clojure-dev (11)
- # clojure-gamedev (30)
- # clojure-russia (380)
- # clojure-spec (50)
- # clojure-uk (35)
- # clojurescript (146)
- # clojutre (1)
- # component (1)
- # cursive (62)
- # datomic (27)
- # dirac (7)
- # editors (23)
- # emacs (7)
- # events (34)
- # funcool (22)
- # hoplon (134)
- # jobs (22)
- # jobs-rus (7)
- # juxt (1)
- # kekkonen (1)
- # lein-figwheel (54)
- # leiningen (7)
- # luminus (2)
- # off-topic (5)
- # om (4)
- # onyx (27)
- # proton (5)
- # protorepl (2)
- # re-frame (16)
- # reagent (29)
- # rethinkdb (2)
- # schema (1)
- # untangled (61)
- # yada (9)
Say, if I'm writing a library and it has some optional functionality that can be used with the mount
library, but mount
isn't required in order to use it, would I put something like this in the project's dependencies?
[mount "0.1.10" :scope "provided"]
I think “provided" is just telling lein to prefer user’s version, not your library’s version of the dep
I’m afraid, to really depend on a library optionally you will have to require it dynamically triggered by some usage scenario
@timgilbert: See https://github.com/technomancy/leiningen/blob/master/doc/PROFILES.md#default-profiles – Especially the section that starts with "The :provided profile is used to specify dependencies that should be available during jar creation, but not propagated to other code that depends on your project...."
TL;DR:
:profiles {:provided {:dependencies [[mount "0.1.10"]]}}
Is the recommended approachOh, great, that makes sense. Thanks @hypirion!