Share your thoughts in the 2024 State of Clojure Survey!

Welcome! Please see the About page for a little more info on how this works.

0 votes
in Errors by

No question--just providing feedback. This command works on Linux but fails on Windows:

clojure -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.4.8"}' :as new

Here is the full error report:

{:clojure.main/message
"Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions.git/coord-err (git.clj:45).\r\nLibrary io.github.seancorfield/deps-new has invalid tag: v0.4.8\r\n",
:clojure.main/triage
{:clojure.error/class clojure.lang.ExceptionInfo,
:clojure.error/line 45,
:clojure.error/cause
"Library io.github.seancorfield/deps-new has invalid tag: v0.4.8",
:clojure.error/symbol
clojure.tools.deps.alpha.extensions.git/coord-err,
:clojure.error/source "git.clj",
:clojure.error/phase :execution},
:clojure.main/trace
{:via
[{:type clojure.lang.ExceptionInfo,

:message
"Library io.github.seancorfield/deps-new has invalid tag: v0.4.8",
:data
{:lib io.github.seancorfield/deps-new,
 :coord
 {:git/tag v0.4.8,
  :git/sha "a059d98edcbe25d5fb5b17052b56ab31a8d4eeff"}},
:at
[clojure.tools.deps.alpha.extensions.git$coord_err
 invokeStatic
 "git.clj"
 45]}],

:trace
[[clojure.tools.deps.alpha.extensions.git$coord_err

invokeStatic
"git.clj"
45]

[clojure.tools.deps.alpha.extensions.git$coord_err

invoke
"git.clj"
43]

[clojure.tools.deps.alpha.extensions.git$eval1234$fn__1236

invoke
"git.clj"
66]

[clojure.lang.MultiFn invoke "MultiFn.java" 239]
[clojure.tools.tools.api$install invokeStatic "api.clj" 45]
[clojure.tools.tools.api$install invoke "api.clj" 20]
[clojure.lang.AFn applyToHelper "AFn.java" 154]
[clojure.lang.AFn applyTo "AFn.java" 144]
[clojure.lang.Var applyTo "Var.java" 705]
[clojure.core$apply invokeStatic "core.clj" 667]
[clojure.core$apply invoke "core.clj" 662]
[clojure.run.exec$exec invokeStatic "exec.clj" 48]
[clojure.run.exec$exec doInvoke "exec.clj" 39]
[clojure.lang.RestFn invoke "RestFn.java" 423]
[clojure.run.exec$_main$fn__205 invoke "exec.clj" 178]
[clojure.run.exec$_main invokeStatic "exec.clj" 174]
[clojure.run.exec$_main doInvoke "exec.clj" 139]
[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
"Library io.github.seancorfield/deps-new has invalid tag: v0.4.8",
:data
{:lib io.github.seancorfield/deps-new,
:coord
{:git/tag v0.4.8,

:git/sha "a059d98edcbe25d5fb5b17052b56ab31a8d4eeff"}}}}

1 Answer

0 votes
by
selected by
 
Best answer

Windows cmd.exe and Powershell both require different quoting to Linux/macOS.

Try either double or triple " around the version instead of single "

(according to the 2020 "State of Clojure" survey, only about 5% of Clojure users are on Windows with cmd or PS, 5% use Windows with WSL2 and therefore run Clojure stuff on Linux, and 90% use macOS or Linux -- which is why you'll often find instructions/tutorials that do not work as-is on Windows cmd/PS)

by
clojure -Ttools install io.github.seancorfield/deps-new "{:git/tag """"v0.4.8""""}" :as new

That works.  Thanks for the help.
...