Welcome! Please see the About page for a little more info on how this works.

+1 vote
in tools.deps.alpha by
edited by

In deps.edn, it would be really handy to be able to write :exclusions [io.netty/*].

For example, here is an excerpt from my project's clojure -Stree. How would you recommend getting this project to have a consistent version of all the io.netty libraries without writing a long, error-prone exclusions?

com.datomic/datomic-pro 0.9.5981
  io.netty/netty-all 4.1.32.Final

com.turo/pushy 0.13.10
  io.netty/netty-handler-proxy 4.1.37.Final
    io.netty/netty-codec-socks 4.1.37.Final
  io.netty/netty-resolver-dns 4.1.37.Final
    io.netty/netty-codec-dns 4.1.37.Final

software.amazon.awssdk/s3 2.10.5
  software.amazon.awssdk/netty-nio-client 2.10.5
    io.netty/netty-common 4.1.42.Final
    io.netty/netty-codec-http2 4.1.42.Final
    io.netty/netty-codec 4.1.42.Final
    io.netty/netty-buffer 4.1.42.Final
    io.netty/netty-handler 4.1.42.Final
    io.netty/netty-transport-native-epoll$linux-x86_64 4.1.42.Final
      io.netty/netty-transport-native-unix-common 4.1.42.Final
    io.netty/netty-transport 4.1.42.Final
      io.netty/netty-resolver 4.1.42.Final
    io.netty/netty-codec-http 4.1.42.Final

I wish this situation were rare, but I think it's fairly common for large libraries to have an "all" dependency as well as individual component artifacts. Some examples include netty, jetty, ring, ai.h2o, and com.amazonaws, just to name a few from memory.

Jira logged at https://clojure.atlassian.net/browse/TDEPS-141

1 Answer

+1 vote
by

Seems reasonable to consider. Logged in jira at https://clojure.atlassian.net/browse/TDEPS-141

I think the biggest downside is that deps.edn then requires an extra step to interpret and the wildcard is something that could change meaning over time if new artifacts in that groupId are created.

by
I'll offer as a data point that we've stopped using :exclusions with deps.edn -- because we were using it to control how versions were resolved (a hangover from our Leiningen/Boot days as we copied across dependencies). Instead we provide a top-level dependency declaration for the "all" variant of such libraries so that overrides all of the transitive ones (which was our main use case for :exclusions in lein/boot).
...