Tools.deps not downloading all deps when run with -R aliases?


#1

:wave: hi all, I’m seeing something surprising with tools.deps and CLI tools:

I like to be able to download all my deps as a discrete step, in advance of actually running anything. (I mostly use this in building Docker images but I have a feeling there are some other cases wherein this can be handy.)

Right now I’m doing so by first running clojure -R:alias-a:alias-b -Stree to download all the deps and then later I might run one of those aliases with clojure -A:alias:

With this approach I would expect that no deps would be downloaded when running the second command, because they should have all been downloaded and cached by the first command.

Instead, I’m seeing that 3 of my deps are downloaded when running the second command.

Obviously I’m missing something — anyone have any pointers for me?

Both commands and their output
C02TG4CYFVH4:tool avi.flax$ clojure -R:test:test/coverage:lint -Stree
Downloading: org/clojure/clojure/1.9.0/clojure-1.9.0.pom from https://repo1.maven.org/maven2/
Downloading: eftest/eftest/0.5.3/eftest-0.5.3.pom from https://repo.clojars.org/
Downloading: expound/expound/0.7.1/expound-0.7.1.pom from https://repo.clojars.org/
Downloading: org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/pom.contrib/0.2.2/pom.contrib-0.2.2.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.cli/0.4.1/tools.cli-0.4.1.pom from https://repo1.maven.org/maven2/
Downloading: com/cognitect/anomalies/0.1.12/anomalies-0.1.12.pom from https://repo1.maven.org/maven2/
Downloading: com/gfredericks/test.chuck/0.2.9/test.chuck-0.2.9.pom from https://repo.clojars.org/
Downloading: cloverage/cloverage/1.0.13/cloverage-1.0.13.pom from https://repo.clojars.org/
Downloading: potemkin/potemkin/0.4.5/potemkin-0.4.5.pom from https://repo.clojars.org/
Downloading: org/clojure/test.check/0.10.0-alpha3/test.check-0.10.0-alpha3.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.async/0.4.474/core.async-0.4.474.pom from https://repo1.maven.org/maven2/
Downloading: circleci/clj-yaml/0.5.6/clj-yaml-0.5.6.pom from https://repo.clojars.org/
Downloading: org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.namespace/0.2.11/tools.namespace-0.2.11.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/pom.contrib/0.1.2/pom.contrib-0.1.2.pom from https://repo1.maven.org/maven2/
Downloading: org/sonatype/oss/oss-parent/7/oss-parent-7.pom from https://repo1.maven.org/maven2/
Downloading: progrock/progrock/0.1.2/progrock-0.1.2.pom from https://repo.clojars.org/
Downloading: io/aviso/pretty/0.1.34/pretty-0.1.34.pom from https://repo.clojars.org/
Downloading: mvxcvi/puget/1.0.2/puget-1.0.2.pom from https://repo.clojars.org/
Downloading: clj-time/clj-time/0.10.0/clj-time-0.10.0.pom from https://repo.clojars.org/
Downloading: com/andrewmcveigh/cljs-time/0.5.1/cljs-time-0.5.1.pom from https://repo.clojars.org/
Downloading: instaparse/instaparse/1.3.6/instaparse-1.3.6.pom from https://repo.clojars.org/
Downloading: org/clojure/tools.reader/1.1.2/tools.reader-1.1.2.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.logging/0.4.0/tools.logging-0.4.0.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.xml/0.0.8/data.xml-0.0.8.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.json/0.2.6/data.json-0.2.6.pom from https://repo1.maven.org/maven2/
Downloading: timofreiberg/bultitude/0.2.10/bultitude-0.2.10.pom from https://repo.clojars.org/
Downloading: riddley/riddley/0.1.14/riddley-0.1.14.pom from https://repo.clojars.org/
Downloading: slingshot/slingshot/0.12.2/slingshot-0.12.2.pom from https://repo.clojars.org/
Downloading: venantius/ultra/0.5.2/ultra-0.5.2.pom from https://repo.clojars.org/
Downloading: cljfmt/cljfmt/0.6.0/cljfmt-0.6.0.pom from https://repo.clojars.org/
Downloading: com/googlecode/java-diff-utils/diffutils/1.2.1/diffutils-1.2.1.pom from https://repo1.maven.org/maven2/
Downloading: clj-tuple/clj-tuple/0.2.2/clj-tuple-0.2.2.pom from https://repo.clojars.org/
Downloading: riddley/riddley/0.1.12/riddley-0.1.12.pom from https://repo.clojars.org/
Downloading: org/clojure/tools.analyzer.jvm/0.7.0/tools.analyzer.jvm-0.7.0.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/pom.contrib/0.2.0/pom.contrib-0.2.0.pom from https://repo1.maven.org/maven2/
Downloading: org/yaml/snakeyaml/1.13/snakeyaml-1.13.pom from https://repo1.maven.org/maven2/
Downloading: org/flatland/ordered/1.5.5/ordered-1.5.5.pom from https://repo.clojars.org/
Downloading: mvxcvi/arrangement/1.1.1/arrangement-1.1.1.pom from https://repo.clojars.org/
Downloading: fipp/fipp/0.6.10/fipp-0.6.10.pom from https://repo.clojars.org/
Downloading: joda-time/joda-time/2.7/joda-time-2.7.pom from https://repo1.maven.org/maven2/
Downloading: org/tcrawley/dynapath/1.0.0/dynapath-1.0.0.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.pom from https://repo1.maven.org/maven2/
Downloading: grimradical/clj-semver/0.3.0/clj-semver-0.3.0.pom from https://repo.clojars.org/
Downloading: org/clojure/clojure/maven-metadata.xml from https://repo1.maven.org/maven2/
Downloading: org/clojure/clojure/maven-metadata.xml from https://repo.clojars.org/
Downloading: io/aviso/pretty/0.1.30/pretty-0.1.30.pom from https://repo.clojars.org/
Downloading: mvxcvi/whidbey/1.3.0/whidbey-1.3.0.pom from https://repo.clojars.org/
Downloading: mvxcvi/puget/1.0.1/puget-1.0.1.pom from https://repo.clojars.org/
Downloading: org/clojars/brenton/google-diff-match-patch/0.1/google-diff-match-patch-0.1.pom from https://repo.clojars.org/
Downloading: robert/hooke/1.3.0/hooke-1.3.0.pom from https://repo.clojars.org/
Downloading: venantius/glow/0.1.4/glow-0.1.4.pom from https://repo.clojars.org/
Downloading: org/clojure/tools.reader/1.2.2/tools.reader-1.2.2.pom from https://repo1.maven.org/maven2/
Downloading: com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.pom from https://repo1.maven.org/maven2/
Downloading: rewrite-clj/rewrite-clj/0.6.0/rewrite-clj-0.6.0.pom from https://repo.clojars.org/
Downloading: rewrite-cljs/rewrite-cljs/0.4.4/rewrite-cljs-0.4.4.pom from https://repo.clojars.org/
Downloading: org/clojure/tools.analyzer/0.6.9/tools.analyzer-0.6.9.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.memoize/0.5.9/core.memoize-0.5.9.pom from https://repo1.maven.org/maven2/
Downloading: org/ow2/asm/asm-all/4.2/asm-all-4.2.pom from https://repo1.maven.org/maven2/
Downloading: org/ow2/asm/asm-parent/4.2/asm-parent-4.2.pom from https://repo1.maven.org/maven2/
Downloading: org/ow2/ow2/1.3/ow2-1.3.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.reader/1.0.0-beta4/tools.reader-1.0.0-beta4.pom from https://repo1.maven.org/maven2/
Downloading: org/flatland/useful/0.9.0/useful-0.9.0.pom from https://repo.clojars.org/
Downloading: org/clojure/core.rrb-vector/0.0.11/core.rrb-vector-0.0.11.pom from https://repo1.maven.org/maven2/
Downloading: mvxcvi/puget/1.0.0/puget-1.0.0.pom from https://repo.clojars.org/
Downloading: org/clojure/data.codec/0.1.0/data.codec-0.1.0.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/pom.contrib/0.0.25/pom.contrib-0.0.25.pom from https://repo1.maven.org/maven2/
Downloading: org/sonatype/oss/oss-parent/5/oss-parent-5.pom from https://repo1.maven.org/maven2/
Downloading: clj-antlr/clj-antlr/0.2.3/clj-antlr-0.2.3.pom from https://repo.clojars.org/
Downloading: instaparse/instaparse/1.4.1/instaparse-1.4.1.pom from https://repo.clojars.org/
Downloading: org/clojure/tools.reader/0.10.0/tools.reader-0.10.0.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/clojurescript/1.7.228/clojurescript-1.7.228.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.reader/1.0.5/tools.reader-1.0.5.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.cache/0.6.5/core.cache-0.6.5.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.macro/0.1.1/tools.macro-0.1.1.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/pom.contrib/0.0.20/pom.contrib-0.0.20.pom from https://repo1.maven.org/maven2/
Downloading: org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.pom from https://repo1.maven.org/maven2/
Downloading: org/antlr/antlr4-master/4.5.3/antlr4-master-4.5.3.pom from https://repo1.maven.org/maven2/
Downloading: org/sonatype/oss/oss-parent/9/oss-parent-9.pom from https://repo1.maven.org/maven2/
Downloading: org/antlr/antlr4/4.5.3/antlr4-4.5.3.pom from https://repo1.maven.org/maven2/
Downloading: com/google/javascript/closure-compiler/v20151216/closure-compiler-v20151216.pom from https://repo1.maven.org/maven2/
Downloading: com/google/javascript/closure-compiler-parent/v20151216/closure-compiler-parent-v20151216.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/google-closure-library/0.0-20151016-61277aea/google-closure-library-0.0-20151016-61277aea.pom from https://repo1.maven.org/maven2/
Downloading: org/mozilla/rhino/1.7R5/rhino-1.7R5.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.reader/1.0.0-alpha1/tools.reader-1.0.0-alpha1.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.priority-map/0.0.7/data.priority-map-0.0.7.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/google-closure-library-third-party/0.0-20151016-61277aea/google-closure-library-third-party-0.0-20151016-61277aea.pom from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.json/0.2.6/data.json-0.2.6.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/clojure/1.9.0/clojure-1.9.0.jar from https://repo1.maven.org/maven2/
Downloading: eftest/eftest/0.5.3/eftest-0.5.3.jar from https://repo.clojars.org/
Downloading: joda-time/joda-time/2.7/joda-time-2.7.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.analyzer/0.6.9/tools.analyzer-0.6.9.jar from https://repo1.maven.org/maven2/
Downloading: timofreiberg/bultitude/0.2.10/bultitude-0.2.10.jar from https://repo.clojars.org/
Downloading: org/clojure/tools.logging/0.4.0/tools.logging-0.4.0.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.specs.alpha/0.1.24/core.specs.alpha-0.1.24.jar from https://repo1.maven.org/maven2/
Downloading: expound/expound/0.7.1/expound-0.7.1.jar from https://repo.clojars.org/
Downloading: org/clojure/spec.alpha/0.2.176/spec.alpha-0.2.176.jar from https://repo1.maven.org/maven2/
Downloading: org/antlr/antlr4-runtime/4.5.3/antlr4-runtime-4.5.3.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.cli/0.4.1/tools.cli-0.4.1.jar from https://repo1.maven.org/maven2/
Downloading: mvxcvi/puget/1.0.2/puget-1.0.2.jar from https://repo.clojars.org/
Downloading: org/clojure/tools.analyzer.jvm/0.7.0/tools.analyzer.jvm-0.7.0.jar from https://repo1.maven.org/maven2/
Downloading: venantius/glow/0.1.4/glow-0.1.4.jar from https://repo.clojars.org/
Downloading: mvxcvi/whidbey/1.3.0/whidbey-1.3.0.jar from https://repo.clojars.org/
Downloading: org/clojure/tools.macro/0.1.1/tools.macro-0.1.1.jar from https://repo1.maven.org/maven2/
Downloading: com/cognitect/anomalies/0.1.12/anomalies-0.1.12.jar from https://repo1.maven.org/maven2/
Downloading: com/gfredericks/test.chuck/0.2.9/test.chuck-0.2.9.jar from https://repo.clojars.org/
Downloading: org/flatland/useful/0.9.0/useful-0.9.0.jar from https://repo.clojars.org/
Downloading: org/clojure/google-closure-library/0.0-20151016-61277aea/google-closure-library-0.0-20151016-61277aea.jar from https://repo1.maven.org/maven2/
Downloading: io/aviso/pretty/0.1.34/pretty-0.1.34.jar from https://repo.clojars.org/
Downloading: cljfmt/cljfmt/0.6.0/cljfmt-0.6.0.jar from https://repo.clojars.org/
Downloading: rewrite-clj/rewrite-clj/0.6.0/rewrite-clj-0.6.0.jar from https://repo.clojars.org/
Downloading: org/clojure/clojurescript/1.7.228/clojurescript-1.7.228.jar from https://repo1.maven.org/maven2/
Downloading: slingshot/slingshot/0.12.2/slingshot-0.12.2.jar from https://repo.clojars.org/
Downloading: org/flatland/ordered/1.5.5/ordered-1.5.5.jar from https://repo.clojars.org/
Downloading: org/clojure/tools.namespace/0.2.11/tools.namespace-0.2.11.jar from https://repo1.maven.org/maven2/
Downloading: fipp/fipp/0.6.10/fipp-0.6.10.jar from https://repo.clojars.org/
Downloading: clj-time/clj-time/0.10.0/clj-time-0.10.0.jar from https://repo.clojars.org/
Downloading: org/yaml/snakeyaml/1.13/snakeyaml-1.13.jar from https://repo1.maven.org/maven2/
Downloading: mvxcvi/arrangement/1.1.1/arrangement-1.1.1.jar from https://repo.clojars.org/
Downloading: instaparse/instaparse/1.4.1/instaparse-1.4.1.jar from https://repo.clojars.org/
Downloading: clj-tuple/clj-tuple/0.2.2/clj-tuple-0.2.2.jar from https://repo.clojars.org/
Downloading: org/mozilla/rhino/1.7R5/rhino-1.7R5.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/google-closure-library-third-party/0.0-20151016-61277aea/google-closure-library-third-party-0.0-20151016-61277aea.jar from https://repo1.maven.org/maven2/
Downloading: cloverage/cloverage/1.0.13/cloverage-1.0.13.jar from https://repo.clojars.org/
Downloading: riddley/riddley/0.1.14/riddley-0.1.14.jar from https://repo.clojars.org/
Downloading: progrock/progrock/0.1.2/progrock-0.1.2.jar from https://repo.clojars.org/
Downloading: com/googlecode/java-diff-utils/diffutils/1.3.0/diffutils-1.3.0.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/tools.nrepl/0.2.12/tools.nrepl-0.2.12.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/data.xml/0.0.8/data.xml-0.0.8.jar from https://repo1.maven.org/maven2/
Downloading: com/google/javascript/closure-compiler/v20151216/closure-compiler-v20151216.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.rrb-vector/0.0.11/core.rrb-vector-0.0.11.jar from https://repo1.maven.org/maven2/
Downloading: robert/hooke/1.3.0/hooke-1.3.0.jar from https://repo.clojars.org/
Downloading: com/andrewmcveigh/cljs-time/0.5.1/cljs-time-0.5.1.jar from https://repo.clojars.org/
Downloading: org/clojure/tools.reader/1.2.2/tools.reader-1.2.2.jar from https://repo1.maven.org/maven2/
Downloading: org/tcrawley/dynapath/1.0.0/dynapath-1.0.0.jar from https://repo1.maven.org/maven2/
Downloading: potemkin/potemkin/0.4.5/potemkin-0.4.5.jar from https://repo.clojars.org/
Downloading: org/clojure/test.check/0.10.0-alpha3/test.check-0.10.0-alpha3.jar from https://repo1.maven.org/maven2/
Downloading: venantius/ultra/0.5.2/ultra-0.5.2.jar from https://repo.clojars.org/
Downloading: org/clojure/core.memoize/0.5.9/core.memoize-0.5.9.jar from https://repo1.maven.org/maven2/
Downloading: clj-antlr/clj-antlr/0.2.3/clj-antlr-0.2.3.jar from https://repo.clojars.org/
Downloading: org/clojure/data.priority-map/0.0.7/data.priority-map-0.0.7.jar from https://repo1.maven.org/maven2/
Downloading: org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.cache/0.6.5/core.cache-0.6.5.jar from https://repo1.maven.org/maven2/
Downloading: rewrite-cljs/rewrite-cljs/0.4.4/rewrite-cljs-0.4.4.jar from https://repo.clojars.org/
Downloading: org/ow2/asm/asm-all/4.2/asm-all-4.2.jar from https://repo1.maven.org/maven2/
Downloading: org/clojure/core.async/0.4.474/core.async-0.4.474.jar from https://repo1.maven.org/maven2/
Downloading: circleci/clj-yaml/0.5.6/clj-yaml-0.5.6.jar from https://repo.clojars.org/
Downloading: org/clojure/data.codec/0.1.0/data.codec-0.1.0.jar from https://repo1.maven.org/maven2/
Downloading: grimradical/clj-semver/0.3.0/clj-semver-0.3.0.jar from https://repo.clojars.org/
Downloading: org/clojars/brenton/google-diff-match-patch/0.1/google-diff-match-patch-0.1.jar from https://repo.clojars.org/
org.clojure/clojure 1.9.0
  org.clojure/core.specs.alpha 0.1.24
eftest/eftest 0.5.3
  mvxcvi/puget 1.0.2
    fipp/fipp 0.6.10
      org.clojure/core.rrb-vector 0.0.11
    mvxcvi/arrangement 1.1.1
  io.aviso/pretty 0.1.34
  org.clojure/tools.namespace 0.2.11
  progrock/progrock 0.1.2
expound/expound 0.7.1
org.clojure/spec.alpha 0.2.176
org.clojure/tools.cli 0.4.1
com.cognitect/anomalies 0.1.12
com.gfredericks/test.chuck 0.2.9
  clj-time/clj-time 0.10.0
    joda-time/joda-time 2.7
  com.andrewmcveigh/cljs-time 0.5.1
cloverage/cloverage 1.0.13
  org.clojure/data.json 0.2.6
  timofreiberg/bultitude 0.2.10
    org.tcrawley/dynapath 1.0.0
  org.clojure/tools.logging 0.4.0
  slingshot/slingshot 0.12.2
  riddley/riddley 0.1.14
  org.clojure/data.xml 0.0.8
  venantius/ultra 0.5.2
    venantius/glow 0.1.4
      instaparse/instaparse 1.4.1
      clj-antlr/clj-antlr 0.2.3
        org.antlr/antlr4-runtime 4.5.3
        org.antlr/antlr4 4.5.3
    mvxcvi/whidbey 1.3.0
      org.clojure/data.codec 0.1.0
    org.clojure/tools.nrepl 0.2.12
    robert/hooke 1.3.0
    grimradical/clj-semver 0.3.0
    org.clojars.brenton/google-diff-match-patch 0.1
github-JamesLaverack/cljfmt-runner https://github.com/JamesLaverack/cljfmt-runner 97960e9
  cljfmt/cljfmt 0.6.0
    rewrite-clj/rewrite-clj 0.6.0
    com.googlecode.java-diff-utils/diffutils 1.3.0
    org.clojure/tools.reader 1.2.2
    rewrite-cljs/rewrite-cljs 0.4.4
      org.clojure/clojurescript 1.7.228
        org.clojure/google-closure-library 0.0-20151016-61277aea
          org.clojure/google-closure-library-third-party 0.0-20151016-61277aea
        org.mozilla/rhino 1.7R5
        com.google.javascript/closure-compiler v20151216
potemkin/potemkin 0.4.5
  clj-tuple/clj-tuple 0.2.2
org.clojure/test.check 0.10.0-alpha3
org.clojure/core.async 0.4.474
  org.clojure/tools.analyzer.jvm 0.7.0
    org.clojure/tools.analyzer 0.6.9
    org.clojure/core.memoize 0.5.9
      org.clojure/core.cache 0.6.5
        org.clojure/data.priority-map 0.0.7
    org.ow2.asm/asm-all 4.2
circleci/clj-yaml 0.5.6
  org.flatland/ordered 1.5.5
    org.flatland/useful 0.9.0
      org.clojure/tools.macro 0.1.1
  org.yaml/snakeyaml 1.13

$ clojure -A:test
Downloading: instaparse/instaparse/1.3.6/instaparse-1.3.6.jar from https://repo.clojars.org/
Downloading: riddley/riddley/0.1.12/riddley-0.1.12.jar from https://repo.clojars.org/
Downloading: org/clojure/tools.reader/1.0.0-beta4/tools.reader-1.0.0-beta4.jar from https://repo1.maven.org/maven2/
Clojure 1.9.0
user=> ^D
My deps.edn
{:paths ["src/main" "src/cli"]
 :deps
 {org.clojure/core.async      {:mvn/version "0.4.474"}
  org.clojure/spec.alpha      {:mvn/version "0.2.176"}
  org.clojure/tools.cli       {:mvn/version "0.4.1"}
  circleci/clj-yaml           {:mvn/version "0.5.6"}
  potemkin                    {:mvn/version "0.4.5"}
  expound                     {:mvn/version "0.7.1"}
  com.cognitect/anomalies     {:mvn/version "0.1.12"}

  ;; test.chuck is in the main dependency list, rather than in the test profile,
  ;; because we’re using one of its generators in a spec in a source file.
  ;; This means we’ll also need org.clojure/test.check at runtime. Not ideal,
  ;; but worth it.
  com.gfredericks/test.chuck  {:mvn/version "0.2.9"}}

 :aliases {:dev           {:extra-deps  {org.clojure/tools.trace    {:mvn/version "0.7.9"}
                                         inspectable                {:mvn/version "0.2.2"}}}

           :test          {:extra-paths ["test" "src/test_utils"]
                           :extra-deps  {org.clojure/test.check     {:mvn/version "0.10.0-alpha3"}
                                         eftest                     {:mvn/version "0.5.3"}
                                         image-resizer              {:mvn/version "0.1.10"}}}

           :test/run      {:main-opts   ["-m" "fc4.test-runner.runner"]}

           :test/coverage {:extra-deps  {cloverage                  {:mvn/version "1.0.13"}}
                           :main-opts   ["-m" "cloverage.coverage"
                                         "--src-ns-path" "src/main"
                                         "--test-ns-path" "test"
                                         "--runner" ":fc4.test-runner"
                                         "--fail-threshold" "65"
                                         "--codecov"]}

           :lint          {:extra-deps  {github-JamesLaverack/cljfmt-runner
                                         {:git/url "https://github.com/JamesLaverack/cljfmt-runner"
                                          :sha     "97960e9a6464935534b5a6bab529e063d0027128"}}
                           :main-opts   ["-m" "cljfmt-runner.check"]}

           :lint/fix      {:main-opts   ["-m" "cljfmt-runner.fix"]}

           :uberjar       {:extra-deps  {luchiniatwork/cambada {:mvn/version "1.0.0"}}
                           :main-opts   ["-m" "cambada.uberjar"
                                         "-m" "fc4.cli.fc4"
                                         "--aot" "all"
                                         "--no-copy-source"
                                         "--out" "target"]}

           :clj-next      {:override-deps {org.clojure/clojure {:mvn/version "1.10.0-beta4"}}}}}

#2

Hard to say without looking at the deps.edn file.


#3

It is downloading all dependencies but there is a version conflict somewhere. I guess the other aliases add some dependency that requires instaparse 1.4.1 but without that alias 1.3.6 is used. Same for the others.


#4

Ah yes, of course! I’ve added it to my top post. Thanks!

OK, that makes sense, but why is the end result different depending on which types of aliases I “activate”? I would think if there’s a version conflict when using -R then the same conflict should be present when using -A and should be dealt with in the same way…?


#5

If you do clj -R:test -Stree you’ll see what just :test depends on. When you add :test/coverage, you add a lot more transitive dependencies and they override the versions with newer versions for those.

In particular:

org.clojure/core.async 0.4.474
  org.clojure/tools.analyzer.jvm 0.7.0
    org.clojure/tools.analyzer 0.6.9
    org.clojure/tools.reader 1.0.0-beta4

and:

com.gfredericks/test.chuck 0.2.9
  clj-time/clj-time 0.10.0
    joda-time/joda-time 2.7
  instaparse/instaparse 1.3.6

Whereas, with all the deps in play:

cloverage/cloverage 1.0.13
  ...
  venantius/ultra 0.5.2
    venantius/glow 0.1.4
      instaparse/instaparse 1.4.1

and

github-JamesLaverack/cljfmt-runner https://github.com/JamesLaverack/cljfmt-runner 97960e9
  cljfmt/cljfmt 0.6.0
    rewrite-clj/rewrite-clj 0.6.0
    com.googlecode.java-diff-utils/diffutils 1.3.0
    org.clojure/tools.reader 1.2.2

#6

I get it now! Thanks so much Sean, I really appreciate it!


#7

Given all this, it seems almost a miracle that my various profiles actually work, given the degree to which they can vary. I wonder whether I should consider overriding the conflicts so that all my profiles end up using the same version of e.g. instaparse. :thinking:


#8

If you care about the versions of transitive dependencies then, yes, you should probably specify them at the top level in all your aliases that need those dependencies.


#9

It’s worth mentioning that the Clojure CLI / tools.deps uses a different algorithm for selecting the “winning” dependency version than Maven does (and therefore Leiningen/Boot). tools.deps tries to select the most recent consistent versions of all dependencies (if there is no top-level version and no :override-deps version). Maven selects the winning version based on traversal order – whichever is the first version it encounters – which can be argued as being either “more predictable” or “less predictable” depending on your point of view :slight_smile:


#10

:thinking: I don’t think I really care… I think the situation just makes me a little uneasy. But what the hell, it’s always a miracle that any of this ever works, so maybe it’s better to stay connected to that fact… :sweat_smile:


#11

Good to know — thanks! Do you happen to recall whether the rationale for this approach has been discussed anywhere?


#12

I recall that it has been discussed but, unfortunately, I do not recall where it has been discussed.