clj-on-windows 2022-09-13

I https://github.com/clojure/tools.deps.alpha/wiki/clj-on-Windows#install but I get an error for any deps that use :git/url and :git/sha. I also tried with https://github.com/borkdude/deps.cljhttps://github.com/borkdude/deps.clj but I get the same error.

Error building classpath. Commit not found for babashka/babashka.core in repo  at 52a6037bd4b632bffffb04394fb4efd0cdab6b1e
or
Error building classpath. Commit not found for com.taoensso/timbre in repo  at 4223bac204669d9a98bf8b6db17f57d5f3e206e2
What can I do to debug this?

Perhaps the git process is failing

Alex Miller (Clojure team) 2022-09-13T15:55:10.338879Z

if you set the system property GITLIBS_DEBUG=true you'll see the exact git commands being run

Thank you!

PS C:\Users\richie\clerk-debug> clojure
git --git-dir C:\Users\richie\.gitlibs\_repos\https\\babashka\babashka.core rev-parse 52a6037bd4b632bffffb04394fb4efd0cdab6b1e^{commit}
fatal: ambiguous argument '52a6037bd4b632bffffb04394fb4efd0cdab6b1e^commit': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
git --git-dir C:\Users\richie\.gitlibs\_repos\https\\babashka\babashka.core fetch --quiet --all --tags --prune
git --git-dir C:\Users\richie\.gitlibs\_repos\https\\babashka\babashka.core rev-parse 52a6037bd4b632bffffb04394fb4efd0cdab6b1e^{commit}
fatal: ambiguous argument '52a6037bd4b632bffffb04394fb4efd0cdab6b1e^commit': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Error building classpath. Commit not found for babashka/babashka.core in repo  at 52a6037bd4b632bffffb04394fb4efd0cdab6b1e
Hmm...

Alex Miller (Clojure team) 2022-09-13T16:05:49.667319Z

what version did you install?

PS C:\Users\richie\clerk-debug> clojure --version
Clojure CLI version 1.11.1.1113

Alex Miller (Clojure team) 2022-09-13T16:06:28.162999Z

and what version of git do you have?

Alex Miller (Clojure team) 2022-09-13T16:06:43.661159Z

just trying to collect the details :)

👍 1

PS C:\Users\richie\clerk-debug> git --version
git version 2.37.1

It looks like it's the git from msys2.

PS C:\Users\richie\clerk-debug> whereis git
git: /usr/bin/git.exe /usr/share/git /usr/share/man/man1/git.1.gz
Idk if that's an issue. I can try installing git another way.

Alex Miller (Clojure team) 2022-09-13T16:07:34.621389Z

nah, that should be fine I think

It looks like 52a6037bd4b632bffffb04394fb4efd0cdab6b1e^{commit} got turned into 52a6037bd4b632bffffb04394fb4efd0cdab6b1e^commit and that's not valid...

Alex Miller (Clojure team) 2022-09-13T16:08:53.348569Z

do you have the git coord handy?

Alex Miller (Clojure team) 2022-09-13T16:09:13.408359Z

oh, yeah that's definitely it - I should have noticed that

babashka/babashka.core
  {:git/url "",
   :git/sha "52a6037bd4b632bffffb04394fb4efd0cdab6b1e"}

Alex Miller (Clojure team) 2022-09-13T16:09:30.251119Z

so probably a quoting issue in tools.gitlibs

Is that what you were asking for?

For the git coord I mean.

Alex Miller (Clojure team) 2022-09-13T16:09:41.014519Z

yep

Alex Miller (Clojure team) 2022-09-13T16:16:27.314569Z

the one comment on the answer there indicates some fix in git (not sure if those version numbers relate to yours)

Thanks, I'll try it.

From the comments: > After update to git version 2.18.0.windows.1 I discovered they fixed the issue, so we don't need escaping any more

Alex Miller (Clojure team) 2022-09-13T16:17:07.895169Z

yeah that one

Alex Miller (Clojure team) 2022-09-13T16:17:19.560729Z

what shell are you using?

Ah, that would be nice. Thanks for pointing that out.

This is in powershell. C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Although, I have the same problem on msys2 with GITLIBS_DEBUG=true powershell -command clojure

Because that's no different. facepalm

Yay, thanks. I installed git for windows 2.37.3.windows.1 and put it on my path. That fixed it.

Alex Miller (Clojure team) 2022-09-13T16:26:35.078079Z

cool, glad that worked

👍 1
Alex Miller (Clojure team) 2022-09-13T15:55:36.274929Z

might help to run one outside clj and see what you get

Alex Miller (Clojure team) 2022-09-13T15:56:22.346069Z

I will say that neither of those commits seem to exist in those repos on github though so maybe those errors are correct

Alex Miller (Clojure team) 2022-09-13T15:57:01.977149Z

oh wait, they do nvm, was looking at the wrong results