If you try to call create-basis
with an alias that involves tools.deps.alpha
, you get the following exception:
Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions.maven/get-artifact (maven.clj:133).
Could not find artifact org.clojure:tools.deps.alpha:jar:${project.version} in central (https://repo1.maven.org/maven2/)
This is because tools.build
includes a source version of deps.edn
with that string, instead of a version number:
./tools.build/src/main/resources/clojure/tools/deps/deps.edn
:deps {:extra-deps {org.clojure/tools.deps.alpha {:mvn/version "${project.version}"}}}
Here's the minimal repro: in an otherwise empty directory:
;; deps.edn
{:aliases
{:build
{:deps {io.github.clojure/tools.build {:git/tag "v0.1.6" :git/sha "5636e61"}}
:ns-default build}}}
;; build.clj
(ns build
(:require [clojure.tools.build.api :as b]))
(defn bug [_]
(b/create-basis {:aliases [:deps]}))
Then run:
clojure -T:build bug
Given that tools.build
already explicitly depends on t.d.a as follows, I don't understand why it also needs a copy of t.d.a's deps.edn
source in in the resources
tree?
org.clojure/tools.deps.alpha {:mvn/version "0.12.1003"}
Removing that file from the checked out tools.build
(under ~/.gitlibs/libs
) seems to solve the problem and doesn't appear to break anything else...