tools-deps 2024-03-02

this idea came to mind while checking out cprop Would it make sense to support in deps.edn git libraries that don't have a deps.edn by manually adding it ? Something like this maybe?

{:deps
 {io.github.yourname/time-lib {:git/tag "v0.0.1" 
                               :git/sha "4c4a34d"
                               :provide-deps {:paths ["src"]
                                              :deps
                                              {ring/ring-core {:mvn/version "1.11.0"}
                                               ring/ring-defaults {:mvn/version "0.4.0"}
                                               ring/ring-codec {:mvn/version "1.2.0"}}}}}}
cprop does not use deps.edn and they might not do that https://github.com/tolitius/cprop

you could imagine also options like override-deps to fix broken deps or other wild stuff

The usual approach is to specify :deps/manifest :deps (see https://clojure.org/reference/deps_edn#deps_deps_manifest ) and then provide any necessary deps etc at the top-level in your deps.edn file...

So for your example, that would be:

{:deps
 {io.github.yourname/time-lib {:git/tag "v0.0.1" 
                               :git/sha "4c4a34d"
                               :deps/manifest :deps}
  ring/ring-core {:mvn/version "1.11.0"}
  ring/ring-defaults {:mvn/version "0.4.0"}
  ring/ring-codec {:mvn/version "1.2.0"}}}

(`src` is already the default for git deps when you specify :deps/manifest :deps)

(and since those are top-level deps, they would override transitive deps as well)

thank you, I did not know about this feature 🙂