Fork me on GitHub
#clj-on-windows
<
2022-09-13
>
Richie15:09:41

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?

borkdude15:09:41

Perhaps the git process is failing

Alex Miller (Clojure team)15:09:10

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

Richie16:09:13

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)16:09:49

what version did you install?

Richie16:09:10

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

Alex Miller (Clojure team)16:09:28

and what version of git do you have?

Alex Miller (Clojure team)16:09:43

just trying to collect the details :)

👍 1
Richie16:09:44

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

Richie16:09:20

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)16:09:34

nah, that should be fine I think

Richie16:09:51

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

Alex Miller (Clojure team)16:09:53

do you have the git coord handy?

Alex Miller (Clojure team)16:09:13

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

Richie16:09:14

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

Alex Miller (Clojure team)16:09:30

so probably a quoting issue in tools.gitlibs

Richie16:09:32

Is that what you were asking for?

Richie16:09:38

For the git coord I mean.

Alex Miller (Clojure team)16:09:27

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

Richie16:09:38

Thanks, I'll try it.

borkdude16:09:01

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)16:09:19

what shell are you using?

Richie16:09:21

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

Richie16:09:55

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

Richie16:09:48

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

Richie16:09:04

Because that's no different. facepalm

Richie16:09:17

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)16:09:35

cool, glad that worked

👍 1
Alex Miller (Clojure team)15:09:36

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

Alex Miller (Clojure team)15:09:22

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)15:09:01

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