I want to start a new library project and I googled around and found deps-new. Following the README, I ran the first line, and got this:
$ clojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
Execution error (ExceptionInfo) at clojure.tools.deps.extensions.git/eval1534$fn (git.clj:144).
No known ancestor relationship between git versions for io.github.seancorfield/deps-new
at a0c510000e18f92abf82d918b0a207ee073b6e71
at c899135de0089059a2770efe79c5022ad874741a
Full report at:
/var/folders/9q/j3dlhz0n6kd_nwk3_bvg_yc00000gn/T/clojure-8838877447435868170.edn
Here are the contents of /var/folders/9q/j3/var/folders/9q/j3dlhz0n6kd_nwk3_bvg_yc00000gn/T/clojure-8838877447435868170.edn:
{:clojure.main/message
"Execution error (ExceptionInfo) at clojure.tools.deps.extensions.git/eval1534$fn (git.clj:144).\nNo known ancestor relationship between git versions for io.github.seancorfield/deps-new\n at a0c510000e18f92abf82d918b0a207ee073b6e71\n at c899135de0089059a2770efe79c5022ad874741a\n",
:clojure.main/triage
{:clojure.error/class clojure.lang.ExceptionInfo,
:clojure.error/line 144,
:clojure.error/cause
"No known ancestor relationship between git versions for io.github.seancorfield/deps-new\n at a0c510000e18f92abf82d918b0a207ee073b6e71\n at c899135de0089059a2770efe79c5022ad874741a",
:clojure.error/symbol clojure.tools.deps.extensions.git/eval1534$fn,
:clojure.error/source "git.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.ExceptionInfo,
:message
"No known ancestor relationship between git versions for io.github.seancorfield/deps-new\n at a0c510000e18f92abf82d918b0a207ee073b6e71\n at c899135de0089059a2770efe79c5022ad874741a",
:data
{:x
{:git/tag "v1.2.381",
:git/sha "a0c510000e18f92abf82d918b0a207ee073b6e71",
:git/url ""},
:y
{:git/tag "v0.5.3",
:git/sha "c899135de0089059a2770efe79c5022ad874741a",
:git/url ""}},
:at
[clojure.tools.deps.extensions.git$eval1534$fn__1535
invoke
"git.clj"
144]}],
:trace
[[clojure.tools.deps.extensions.git$eval1534$fn__1535
invoke
"git.clj"
144]
[clojure.lang.MultiFn invoke "MultiFn.java" 244]
[clojure.tools.tools.api$install_1 invokeStatic "api.clj" 81]
[clojure.tools.tools.api$install_1 invoke "api.clj" 74]
[clojure.tools.tools.api$install_latest invokeStatic "api.clj" 121]
[clojure.tools.tools.api$install_latest invoke "api.clj" 90]
[clojure.lang.Var invoke "Var.java" 384]
[clojure.run.exec$exec invokeStatic "exec.clj" 89]
[clojure.run.exec$exec invoke "exec.clj" 78]
[clojure.run.exec$_main$fn__220 invoke "exec.clj" 228]
[clojure.run.exec$_main invokeStatic "exec.clj" 224]
[clojure.run.exec$_main doInvoke "exec.clj" 192]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.main$main_opt invokeStatic "main.clj" 514]
[clojure.main$main_opt invoke "main.clj" 510]
[clojure.main$main invokeStatic "main.clj" 664]
[clojure.main$main doInvoke "main.clj" 616]
[clojure.lang.RestFn applyTo "RestFn.java" 137]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.main main "main.java" 40]],
:cause
"No known ancestor relationship between git versions for io.github.seancorfield/deps-new\n at a0c510000e18f92abf82d918b0a207ee073b6e71\n at c899135de0089059a2770efe79c5022ad874741a",
:data
{:x
{:git/tag "v1.2.381",
:git/sha "a0c510000e18f92abf82d918b0a207ee073b6e71",
:git/url ""},
:y
{:git/tag "v0.5.3",
:git/sha "c899135de0089059a2770efe79c5022ad874741a",
:git/url ""}}}} I've added a note to the deps-new README about this, saying if you get this error on installation, use clojure -Ttools remove :tool new to remove the old (`clj-new`) tool and then you can install-latest on deps-new.
My clojure version: $ clojure --version
Clojure CLI version 1.11.1.1413
My java version: $ java --version
openjdk 21 2023-09-19
OpenJDK Runtime Environment (build 21+35-2513)
OpenJDK 64-Bit Server VM (build 21+35-2513, mixed mode, sharing)
Iβd appreciate any help you could give, whenever youβre able to give it π
Thank you in advance! π
speculating... is it possible that clj-new is already installed as new?
Interesting theory... I'm not at my computer right now, but how could I test that idea?
I think check ~/.clojure/tools for a new.edn file, and if it's there, it should contain coords to what is currently installed as new
See https://ask.clojure.org/index.php/13368/install-latest-already-another-results-cryptic-error-message - the core team plan to fix install-latest
is it sufficient to rename the edn file to rename the 'tool installation'? I don't see any other correlations...
I believe that will work, yes
I know you can create those tools files manually:grin:
Removing the old file and re-installing also did the trick, thank you!
~ $ cd ~/.clojure/
~/.clojure $ cd tools
~/.clojure/tools $
~/.clojure/tools $ ls -la
total 24
drwxr-xr-x 5 dmiladinov staff 160 Oct 15 10:27 .
drwxr-xr-x 5 dmiladinov staff 160 Feb 18 2023 ..
-rw-r--r-- 1 dmiladinov staff 184 Oct 15 10:27 clj-new.edn
-rw-r--r-- 1 dmiladinov staff 184 Apr 30 14:29 new.edn
-rw------- 1 dmiladinov staff 126 Oct 15 10:25 tools.edn
~/.clojure/tools $ cat new.edn
{:lib com.github.seancorfield/clj-new,
:coord
{:git/tag "v1.2.381",
:git/sha "a0c510000e18f92abf82d918b0a207ee073b6e71",
:git/url ""}}
~/.clojure/tools $ rm new.edn
~/.clojure/tools $ clojure -Ttools inclojure -Ttools install-latest :lib io.github.seancorfield/deps-new :as new
Checking out: at c899135de0089059a2770efe79c5022ad874741a
new: Installed io.github.seancorfield/deps-new v0.5.3 {:git/tag "v0.5.3", :git/sha "c899135"}
~/.clojure/tools $