tools-deps

Eugen 2024-03-02T23:13:39.134359Z

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

Eugen 2024-03-02T23:15:01.159289Z

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

seancorfield 2024-03-02T23:21:03.799579Z

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

seancorfield 2024-03-02T23:22:01.655319Z

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"}}}

seancorfield 2024-03-02T23:22:41.765399Z

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

seancorfield 2024-03-02T23:23:09.138229Z

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

Eugen 2024-03-03T22:30:35.447389Z

thank you, I did not know about this feature 🙂