Environment
clj --version
Clojure CLI version 1.12.0.1479
Source
A chat on Slack where we happened to notice the behaviour.
Scenario
When lib x is both a git dep and a maven dep,
clj -X:deps find-versions :lib x
shows only versions from git deps.
Specific example: io.github.clojure/tools.build
As a git dep:
io.github.clojure/tools.build {:git/tag "v0.10.5" :git/sha "2a21b7a"}
As a Maven dep:
io.github.clojure/tools.build {:mvn/version "0.10.5"}
Reproduction
clj -X:deps find-versions :lib io.github.clojure/tools.build
Actual Behavior
Versions from git deps are listed:
{:git/tag "v0.9.4", :git/sha "76b78fe"}
{:git/tag "v0.9.5", :git/sha "24f2894"}
{:git/tag "v0.9.6", :git/sha "8e78bcc"}
{:git/tag "v0.10.0", :git/sha "3a2c484"}
{:git/tag "v0.10.1", :git/sha "5e3b8f3"}
{:git/tag "v0.10.3", :git/sha "15ead66"}
{:git/tag "v0.10.4", :git/sha "31388ff"}
{:git/tag "v0.10.5", :git/sha "2a21b7a"}
Expected Behavior
TBD by Alex, but note that although maven deps exist, they are not listed.
A few ideas to poke at:
Idea One: populate this list with all available versions:
{:mvn/version "0.9.4" :git/tag "v0.9.4", :git/sha "76b78fe"}
{:mvn/version "0.9.5" :git/tag "v0.9.5", :git/sha "24f2894"}
{:mvn/version "0.9.6" :git/tag "v0.9.6", :git/sha "8e78bcc"}
{:mvn/version "0.10.0" :git/tag "v0.10.0", :git/sha "3a2c484"}
{:mvn/version "0.10.1" :git/tag "v0.10.1", :git/sha "5e3b8f3"}
{:mvn/version "0.10.3" git/tag "v0.10.3", :git/sha "15ead66"}
{:mvn/version "0.10.4" :git/tag "v0.10.4", :git/sha "31388ff"}
{:mvn/version "0.10.5" :git/tag "v0.10.5", :git/sha "2a21b7a"}
But maybe that's a bit confusing for users copy/paste-wise.
Idea Two: list all available versions side by side:
{:mvn/version "0.9.4"} {:git/tag "v0.9.4", :git/sha "76b78fe"}
{:mvn/version "0.9.5"} {:git/tag "v0.9.5", :git/sha "24f2894"}
{:mvn/version "0.9.6"} {git/tag "v0.9.6", :git/sha "8e78bcc"}
{:mvn/version "0.10.0"} {:git/tag "v0.10.0", :git/sha "3a2c484"}
{:mvn/version "0.10.1"} {:git/tag "v0.10.1", :git/sha "5e3b8f3"}
{:mvn/version "0.10.3"} {git/tag "v0.10.3", :git/sha "15ead66"}
{:mvn/version "0.10.4"} {:git/tag "v0.10.4", :git/sha "31388ff"}
{:mvn/version "0.10.5"} {:git/tag "v0.10.5", :git/sha "2a21b7a"}
Idea Three: list all available versions sequentially
{:mvn/version "0.9.4"}
{:mvn/version "0.9.5"}
{:mvn/version "0.9.6"}
{:mvn/version "0.10.0"}
{:mvn/version "0.10.1"}
{:mvn/version "0.10.3"}
{:mvn/version "0.10.4"}
{:mvn/version "0.10.5"}
{:mvn/version "0.9.4" :git/tag "v0.9.4", :git/sha "76b78fe"}
{:mvn/version "0.9.5" :git/tag "v0.9.5", :git/sha "24f2894"}
{:mvn/version "0.9.6" :git/tag "v0.9.6", :git/sha "8e78bcc"}
{:mvn/version "0.10.0" :git/tag "v0.10.0", :git/sha "3a2c484"}
{:mvn/version "0.10.1" :git/tag "v0.10.1", :git/sha "5e3b8f3"}
{:mvn/version "0.10.3" git/tag "v0.10.3", :git/sha "15ead66"}
{:mvn/version "0.10.4" :git/tag "v0.10.4", :git/sha "31388ff"}
{:mvn/version "0.10.5" :git/tag "v0.10.5", :git/sha "2a21b7a"}