tools-deps

Discuss tools.deps.alpha, tools.build, and the clj/clojure command-line scripts! See also #depstar #clj-new
flowthing 2021-04-20T08:24:17.016300Z

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?

borkdude 2021-04-20T09:00:20.016900Z

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

flowthing 2021-04-20T09:08:37.017100Z

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

Mark Wardle 2021-04-20T09:43:55.021700Z

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?

borkdude 2021-04-20T10:09:13.023Z

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

borkdude 2021-04-20T10:10:05.024100Z

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

borkdude 2021-04-20T10:25:07.024700Z

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

Mark Wardle 2021-04-20T11:42:16.024900Z

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…

borkdude 2021-04-20T12:09:42.025100Z

We have left boot behind us now too

👍 1