This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-06
Channels
- # announcements (1)
- # babashka (7)
- # beginners (93)
- # bristol-clojurians (1)
- # cider (7)
- # clj-kondo (42)
- # cljs-dev (9)
- # clojure (67)
- # clojure-europe (4)
- # clojure-france (4)
- # clojure-germany (2)
- # clojure-italy (3)
- # clojure-nl (10)
- # clojure-uk (62)
- # clojurescript (11)
- # clojurex (3)
- # conjure (77)
- # cursive (16)
- # datomic (105)
- # docker (4)
- # editors (3)
- # events (5)
- # fulcro (34)
- # jobs (1)
- # juxt (7)
- # kaocha (7)
- # lambdaisland (3)
- # lein-figwheel (2)
- # leiningen (19)
- # malli (14)
- # meander (6)
- # mid-cities-meetup (6)
- # off-topic (20)
- # pedestal (2)
- # reagent (17)
- # reitit (7)
- # remote-jobs (1)
- # shadow-cljs (17)
- # spacemacs (23)
- # specter (2)
- # tools-deps (34)
I am trying to move a project over from Leiningen to deps. In the project.clj there is a top level :exclusions
vector. Anyone familiar enough with both lein and deps to hint me where I should look up how to translate it to deps?
There is no support for global exclusions right now
But you can repeat it at each top level dep if needed
I am trying to figure out how to create an uberjar with exlusions (This achieved with the :provided
profile in lein). I'm using depstar atm. Has anyone found a way to do this?
@pez: it’s translates directly:
some/dep {:mvn/version "3.0.0"
:exclusions [ch.qos.logback/logback-classic]}
Note: deps uses different dependency resolution from Lein (which relies on Maven). It might make sense to check if you need the exclusions after moving to deps. The ClojureScript podcast S3E4[1] with @alexmiller provides some discussion on this. [1]: https://clojurescriptpodcast.com/
Would it go against deps philosophy to add support for something like provided
? To me that (although it could perhaps be better named) communicates for (some of) its functionality, this project needs xx/yy, however it is left to the consumer to provide those
. Or is a dev
alias with those dependencies the preferred way?
The latter
@rickmoynihan yes, those exclusions work. This is a top-level key that Leiningen supports. I am not even sure what it does, only that I fail to get my project running and thinking it might be this. But after trying with @vlaaad’s suggestion, indicates I also have some other error in my config.
@pez FWIW, we used exclusions heavily with both lein
and boot
but once we switched to deps.edn
we were able to get rid of nearly all our exclusions (I think we still have a couple of exclusions of ClojureScript in our backend deps because we just don't need/want that brought in).
@seancorfield, Thanks! I'll listen to that podcast that @teodorlu mentioned and see if I can figure out why. 😃
https://insideclojure.org/2018/05/04/add-lib/ was this feature never added?
@mikerod Recent commits have made add-lib
depend on Java code in that repo so you can no longer depend on it via git. I built a local version to use, so I could work with the most recent features & fixes. Alex has talked about some form of add-lib
ending up in core or part of the REPL or something... all TBD at this point.
My "dot-clojure" file (`deps.edn`) has a :deps
alias that depends on a git SHA prior to the Java code dependency.
Well, it can be used as-is -- and it generally works just fine. I used it quite a bit in that form for loading new libraries into my running REPL (since I tend to start a REPL and run it for days).
I believe I read there were issues in newer JVMs around trying to add to URL classloaders or something of that sort. This has been worked around in this branch? I’m going to look a bit at the impl because I’m curious what is being done.
Of relevance is this https://github.com/tobias/dynapath#note-on-urlclassloader
@mikerod If you create a dynamic class loader, you can load new libraries/classes into it: that's how we embed Clojure at work into a legacy app and how add-lib
works (you can only use it in a context that has a DCL -- for example, Cognitect's REBL does not, so at work we have a small Clojure script to start REBL's UI after setting up a DCL).
(I'm using a variant of 0.8.667 built locally now)
Rich and I spent an hour this morning talking about it
I deliberately didn't @ you so I wouldn't disturb you 🙂