Fork me on GitHub

hi. I have a transitive deps issue. metosin/malli depends on both borkdude/sci and borkdude/edamame via sha. sci uses edamame via real mvn version. When I try to use malli, the versions conflict:

➜  ~ clj -Sdeps '{:deps {metosin/malli {:git/url "" :sha "28b4ee63bd571ce612e8cd0e9dab6ef86722597e"}}}'
Checking out:  at 28b4ee63bd571ce612e8cd0e9dab6ef86722597e
Downloading: borkdude/edamame/0.0.6/edamame-0.0.6.pom from 
Error building classpath. Unable to compare versions for borkdude/edamame: {:mvn/version "0.0.6", :deps/manifest :mvn} and {:git/url "", :sha "9b3e825b65ec6fe0dc536988fd036e6e681813de", :deps/manifest :deps, :deps/root "/Users/tommi/.gitlibs/libs/borkdude/edamame/9b3e825b65ec6fe0dc536988fd036e6e681813de"}


If I add explicit sha to edamame from command like, it works, but is not what I would like to be needed.


e.g. this works:

➜  ~ clj -Sdeps '{:deps {metosin/malli {:git/url "" :sha "28b4ee63bd571ce612e8cd0e9dab6ef86722597e"}, borkdude/edamame {:git/url "", :sha "9b3e825b65ec6fe0dc536988fd036e6e681813de"}}}'


quick-hacked this so that malli depends on edamame mvn version. Still, curious could it be made to work with just Sha dep to it


What do you think should happen here? The problem is that maven and git don't have a comparison mechanism that makes sense.


@ikitommi I think it's best to depend on a mvn version of edamame then from now on. I'll try to do that with sci as well.


This can be made to work, but I haven’t done so yet. Maven artifacts generally record their sha at build time so it is possible to version compare them.


what if you have two branches that are diverged from the same maven version?


This is just back to the same rules we use for git comparisons - if one version is a descendant of another, its preferred. If there is no ancestor relationship, they aren’t comparable


In that case, it will throw and you need to be explicit at the top level about which dep to use (top dep version always used)