Fork me on GitHub
#tools-deps
<
2018-04-30
>
hagmonk01:04:30

hey so can someone riddle me this … I'm trying to replicate https://github.com/stuartsierra/log.dev/blob/master/project.clj in tools.deps, but finding it quite irritating

hagmonk01:04:38

the problem is that lein takes the top level list of :exclusions in project.clj and applies those to all dependencies, and seemingly to all transitive dependencies

hagmonk01:04:52

it doesn't appear that deps.edn has a facility to achieve the same thing, meaning that one has to manually review the dependency graph, and if any transient dependencies include an unwanted dependency, one must include that dependency and put a specific exclusion in the maven coordinate

hagmonk01:04:31

Is there a more "tools.deps-ish" way to solve this problem?

Alex Miller (Clojure team)02:04:16

This is not a common issue so I don’t see it very high on the priority list

hagmonk02:04:12

Hmm, it's an issue I often run into when trying to "rationalize" the logging situation in a project that has lots of Java deps

Alex Miller (Clojure team)02:04:51

One thing that may exist at some point is the means to specify a lib removal. Given that, this could be done with override-deps or possibly a root dep exclusion

hagmonk02:04:07

It's kind of gross that the presence of certain deps on the classpath causes side effects for logging frameworks. Perhaps this is best handled by a small tool that rewrites deps.edn to incorporate the necessary inclusions / exclusions

pesterhazy13:04:41

@hagmonk wow log.dev looks great, I never knew that existed

hagmonk16:04:27

@pesterhazy yeah! since I end up importing a lot of Java deps I frequently start projects with this set of inclusions / exclusions just so I know that Java logging will be sane