Thanks for https://clojure.atlassian.net/browse/TDEPS-253 , however I noticed it doesn't quite work as expected for a fresh install (with :coord); I get an error due to a missing sha, contrary to the doc string "git coords may omit sha".
clj -Ttools install-latest \
:lib org/tool-name \
:coord '{:git/url "git@gitlab.int.org.com:group/subgroup/tool-name.git"}' \
:as tool-name
=>
Execution error (ExceptionInfo) at clojure.tools.deps.extensions.git/eval1656$fn (git.clj:79).
Library org/tool-name has coord with missing sha
I also found upgrading a tool with saved coordinates (clj -Ttools install-latest :tool tool-name) always results in "Skipping, newest installed" (because passing the coord returned by parse-install-latest-args to install-1 means ext/find-all-versions is never evaluated). Looks like this issue would affect tools with auto resolved git urls too.
Cause:
If tools.tools.api/install-1 is a provided coord that coord is used as is without finding the latest release. If this coord did not contain a sha, which was encouraged by the install-latest docstring, it would return the "coord with missing sha" error message.
Approach:
If a coord is provided to install-1 it is used in the call to find-all-versions to filter out the latest release.
Patch:
tdeps-265-tools.tools-1.patch contains the update to install-1 and a small test suite run by a GitHub actions.
Per https://ask.clojure.org/index.php/13882/tools-tools-install-latest-throws-error-coord-never-upgrades
Thanks for https://clojure.atlassian.net/browse/TDEPS-253 , however I noticed it doesn't quite work as expected for a fresh install (with
:coord
); I get an error due to a missing sha, contrary to the doc string "git coords may omit sha".clj -Ttools install-latest \ :lib org/tool-name \ :coord '{:git/url "git@gitlab.int.org.com:group/subgroup/tool-name.git"}' \ :as tool-name => Execution error (ExceptionInfo) at clojure.tools.deps.extensions.git/eval1656$fn (git.clj:79). Library org/tool-name has coord with missing sha
I also found upgrading a tool with saved coordinates (
clj -Ttools install-latest :tool tool-name
) always results in "Skipping, newest installed" (because passing thecoord
returned byparse-install-latest-args
toinstall-1
meansext/find-all-versions
is never evaluated). Looks like this issue would affect tools with auto resolved git urls too.Cause:
If
tools.tools.api/install-1
is a provided coord that coord is used as is without finding the latest release. If this coord did not contain a sha, which was encouraged by the install-latest docstring, it would return the "coord with missing sha" error message.Approach:
If a coord is provided to install-1 it is used in the call to find-all-versions to filter out the latest release.
Patch:
tdeps-265-tools.tools-1.patch
contains the update toinstall-1
and a small test suite run by a GitHub actions.