Fork me on GitHub
#tools-deps
<
2021-04-20
>
flowthing08:04:17

I have a transitive dependency to an artifact with a reported security vulnerability. With Leiningen, I'd add a :managed-dependencies entry for a version of that artifact where that vulnerability has been fixed. What's the "right" way to do this with deps.edn? Just add a :deps entry?

borkdude09:04:20

@flowthing I think so yes, tools.deps will pick the newest version possible that is required in the deps tree

flowthing09:04:37

All right, thanks. :thumbsup::skin-tone-2:

Mark Wardle09:04:55

Hi all. Is there a way of referencing an alias (or indeed multiple aliases) in a git coordinate in a deps.edn file? The background is https://clojurians.slack.com/archives/C03S1KBA2/p1618904583308100 but essentially, I’d argue this approach might foster modularity and composability - permitting declaration of faceted dependencies. An example might be a repository aligned to a business domain with core code that can be used as a library, but an alias providing, say, ring handlers or graph resolvers that clients can explicitly opt-in or out of, to bundle the functionality into a server application. Possible with maven - by building different artifacts - and with a multiple repository model. Am I barking up wrong tree?

Mark Wardle12:04:11

It looks as if the polylith type approach might work for this - although I do still think git coordinates that could include specific alias(es) and nested directories would do much to configure the exact building blocks to be used to build artefacts from a menu of common libraries / components.

borkdude10:04:13

@mark354 I had something like this with boot: https://github.com/borkdude/boot-bundle But nowadays we just use some EDN to list the deps + fixed versions we need and use a babashka script to update our deps.edn. This is very fast and only needs to happen when we update a dependency.

borkdude10:04:05

Another approach might be to just make a library which depends on other libraries and use that as the managed dependency, tools.deps will always use the newest versions of a lib in a dependency tree, I think

Mark Wardle11:04:16

Thanks! I never used boot as I migrated very quickly from lein to deps when I started with clojure last year. A small standalone library would be fine too except for the potential explosion of repositories named xxx-library xxx-server xxx-graph-api etc…

borkdude12:04:42

We have left boot behind us now too

👍 4
borkdude10:04:07

(off topic, but slightly related: Found another good use for fs/modified-since (a new function in babashka.fs): https://gist.github.com/borkdude/35bc0a20bd4c112dec2c5645f67250e3#file-1-bb-edn-L2-L5 We rebuild our deps.edn from a template when any relevant files on which it depends changes, when invoking any task. )