Fork me on GitHub

So I'm in the middle of converting all our internal dependencies from :mvn/version to :git/url (this would only make sense inside Walmart) and I"m having problems:

> clj -X:dev:test
Error building classpath. Unable to compare versions for com.walmartlabs.clojure/util: {:mvn/version "1.3.0", :deps/manifest :mvn} and {:git/tag "v1.4.0", :git/sha "925c4a5c6984ec641c3fa0f786ec7e48da5e7c64", :git/url ":clojure/util.git", :deps/manifest :deps, :deps/root "/Users/hship/.gitlibs/libs/com.walmartlabs.clojure/util/925c4a5c6984ec641c3fa0f786ec7e48da5e7c64"}
The issue is that I have, somewhere, a transitive dependency that uses the :mvn/version coordinate, and this library now uses a :git/url coordinate. I'm OK with the tool complaining that you can't mix and match this way BUT the above message does not help me hunt down which transitive dependency itself has the :mvn/version coordinate. Is there a tool option that helps here? Is there additional logging that can be enabled? -Strace doesn't seem to work; this error seem to prevent that from being written.


maybe try clj -X:deps tree I forget what the exact command is, I think that should print out a tree of deps


hmmm, that likely won't work either 😕


ok, if you temporarily add the problematic dep to your project's deps.edn, you can run clj -X:deps tree, and it will show all the places that dep is depended on, and show them all as overridden at the top level


then you can find the problem, fix it, and remove the temporary addition to your project's deps.edn


Right; I'm trying adding a :local/root coord and running clj -Stree.


No dice; same message.


if you add a dependency to the deps.edn of the project where you are invoking clj on the problematic dependency com.walmartlabs.clojure/util it will override all the other deps transitive deps (closer to the root of the tree wins) and let you run tree


I thought so too. Let me try with :git/url instead of :local/root.


I say it will do this because I tried it locally


Ah, bad map nesting.


I am in project A which depends on projects C and D, projects C and D both have deps on tools.deps.alpha, one with maven and one with git


Think I found it.