clj-on-windows

Richie 2022-09-13T15:53:41.148169Z

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?

borkdude 2022-09-13T15:54:41.514279Z

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

Richie 2022-09-13T16:05:13.768029Z

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?

Richie 2022-09-13T16:06:10.356819Z

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
Richie 2022-09-13T16:06:44.809059Z

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

Richie 2022-09-13T16:07:20.203539Z

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

Richie 2022-09-13T16:08:51.832639Z

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

Richie 2022-09-13T16:09:14.217829Z

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

Richie 2022-09-13T16:09:32.049119Z

Is that what you were asking for?

Richie 2022-09-13T16:09:38.187929Z

For the git coord I mean.

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

yep

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

https://stackoverflow.com/questions/51625659/how-to-escape-curly-braces-u-of-upstream-in-git-alias-git-bash-on-windows seems like this same issue

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)

Richie 2022-09-13T16:16:38.543079Z

Thanks, I'll try it.

borkdude 2022-09-13T16:17:01.255459Z

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?

Richie 2022-09-13T16:17:21.849349Z

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

Richie 2022-09-13T16:17:55.053919Z

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

Richie 2022-09-13T16:18:48.308249Z

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

Richie 2022-09-13T16:19:04.015409Z

Because that's no different. facepalm

Richie 2022-09-13T16:26:17.784069Z

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