Fork me on GitHub

I am trying to move a project over from Leiningen to deps. In the project.clj there is a top level :exclusionsvector. Anyone familiar enough with both lein and deps to hint me where I should look up how to translate it to deps?

Alex Miller (Clojure team)12:04:10

There is no support for global exclusions right now

Alex Miller (Clojure team)12:04:51

But you can repeat it at each top level dep if needed


Thanks! We'll see if needed. 😃


hmm, I think I saw something about using :override-deps with nil values…


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]:


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?


Understood, thanks


@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. 😃

🙂 4

@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.


Ah ok. Thanks for the details.


My "dot-clojure" file (`deps.edn`) has a :deps alias that depends on a git SHA prior to the Java code dependency.


I did see that one.


But guess it requires some more.


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.


(which is used by pomegranate)


@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).


ah ok. that makes sense - thanks for the extra details


(I'm using a variant of 0.8.667 built locally now)

Alex Miller (Clojure team)21:04:14

I'm actually working on it RIGHT NOW :)

🎉 28
Alex Miller (Clojure team)21:04:39

Rich and I spent an hour this morning talking about it


Quick. Everybody don't bother Alex! 🙂

😂 12

I deliberately didn't @ you so I wouldn't disturb you 🙂


Ok. I appreciate all the input.