Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation Problem in Windows #25

Closed
ITSecMedia opened this issue Jan 10, 2022 · 7 comments
Closed

Installation Problem in Windows #25

ITSecMedia opened this issue Jan 10, 2022 · 7 comments

Comments

@ITSecMedia
Copy link

ITSecMedia commented Jan 10, 2022

Using the most current version : https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows

When I execute the command

"clojure -Ttools install io.github.seancorfield/deps-new '{:git/tag "v0.4.9"}' :as new" in Windows 10 x64

I get the following error.

Execution error (ExceptionInfo) at clojure.tools.deps.alpha.extensions.git/coord-err (git.clj:45).
Library io.github.seancorfield/deps-new has invalid tag: v0.4.9

=== Full 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.9\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.9",
  :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.9",
    :data
    {:lib io.github.seancorfield/deps-new,
     :coord
     {:git/tag v0.4.9,
      :git/sha "ba30a76af8b42a45f8498a168bf89518a794fce5"}},
    :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.9",
  :data
  {:lib io.github.seancorfield/deps-new,
   :coord
   {:git/tag v0.4.9,
    :git/sha "ba30a76af8b42a45f8498a168bf89518a794fce5"}}}}
@seancorfield
Copy link
Owner

Windows cmd.exe and Powershell use different quoting rules to Linux/macOS -- and nearly all tutorials and books for Clojure assume Linux/macOS. This is why I recommend developers use WSL2 on Windows so that all the instructions out there work as expected.

This affects all Clojure CLI usage and is not a bug in deps-new.

I don't use cmd.exe or Powershell (I use WSL2/Ubuntu on Windows and I use macOS) but I think you have to either double- or triple-quote strings for those shells?

@ITSecMedia
Copy link
Author

Thank you Sean.

@seancorfield
Copy link
Owner

BTW, I had a look at the official CLI docs and it doesn't mention this issue with Windows at all, unfortunately. Not https://clojure.org/reference/deps_and_cli#_tool_installation and not even https://clojure.org/reference/deps_and_cli#quoting so I'm going to open an issue on the clojure-site repo about it.

@ITSecMedia
Copy link
Author

The windows way in powershell is :

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

@jsg24
Copy link

jsg24 commented Jan 27, 2022

Heya. Please can this be added to the installation instructions for new users? Unfamiliar infrastructure is already difficult without having to work out this issue on PowerShell.

@seancorfield
Copy link
Owner

I think I'm going to update all my READMEs and point at the (new) official docs about CLI and Powershell in this section https://clojure.org/reference/deps_and_cli#quoting -- that way I'm not duplicating information and it'll help make everyone aware that the official docs cover this now.

@seancorfield
Copy link
Owner

README updated here. See what you think.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants