Fork me on GitHub
#tools-deps
<
2023-01-31
>
Sam Ritchie14:01:24

is there some way to share, say, a version or entry across multiple tools.deps entries? I am thinking of the git sha here: https://github.com/mentat-collective/Mafs.cljs/blob/main/deps.edn#L15-L18

Sam Ritchie14:01:59

This won’t work because we’re EDN not Clojure:

(let [sha "ec666210f11763fce4fec74072acca1e6525d29f"]
  {:aliases
   {:dev
    {:extra-deps
     { {:git/sha sha}
       {:git/sha sha}}}}})
This would work BACK IN THE DAY with Leiningen’s project.clj:
(def sha "ec666210f11763fce4fec74072acca1e6525d29f")

{:aliases
 {:dev
  {:extra-deps
   { {:git/sha ~sha}
     {:git/sha ~sha}}}}}

borkdude14:01:04

You can put the dep in one alias and then compose that alias on the command line.

borkdude14:01:46

it's been a popular request to have derived aliases, but this doesn't exist yet

borkdude14:01:07

Of course you can generate the deps.edn with a script (https://github.com/borkdude/rewrite-edn)

borkdude14:01:38

neil also supports adding deps + sha

mpenet15:01:56

would be nice to have a few tagged literals in tools.deps for that, for instance aero's #ref

mpenet15:01:39

{:thing-version "1.0.0" :deps {.... {:mvn/version #ref [:thing-version] ...}}

mpenet15:01:26

add #include too on top of it and all the monorepo hacks go away

mpenet15:01:33

sorry, I am getting carried away heh

clojure-spin 2