after I introduced a git/sha-based dependency to my project, I started getting some errors in CI triggered by clojure -X:deps prep
Cloning:Cloning:
Checking out: at 8af2ad89a6c4e7bdd9e21974e7df1d26dbc35cac
Execution error (ExceptionInfo) at clojure.tools.gitlibs.impl/git-clone-bare (impl.clj:103).
Unable to clone /home/circleci/.gitlibs/_repos/https/github.com/stylitics/temporal-clojure-sdk
fatal: destination path '/home/circleci/.gitlibs/_repos/https/github.com/stylitics/temporal-clojure-sdk' already exists and is not an empty directory.
or
Cloning:
Downloading: org/clojure/clojure/maven-metadata.xml from central
Execution error (ExceptionInfo) at clojure.tools.gitlibs.impl/git-clone-bare (impl.clj:103).
Unable to clone /home/circleci/.gitlibs/_repos/https/github.com/stylitics/temporal-clojure-sdk
BUG: refs/files-backend.c:3048: initial ref transaction called with existing refs
which I guess is similar; trying to clone a repo in the process of being cloned. is this a known issue? I found a message from 2020: https://clojurians.slack.com/archives/C6QH853H8/p1587654332310300
...but -Sthreads 1 didn't help. clojure --version seems to be 1.12.0.1530. I was also surprised to see prep git cloning the repository even when it was in :exclusionsI will probably need more info to understand what's happening - can you help me understand the dependency structure here? if it is a concurrency thing, I have a possible fix on that, hoping to get to a dev release to try later today if I have time
I would ask that you update to the latest tools.deps or CLI, would prefer not to debug an old version. Is this repeatable?
also, a potentially useful thing is to turn on gitlibs debugging by setting the env var GITLIBS_DEBUG=true (will dump every command being shelled out to git)
Assuming .gitlibs is being cached between your ci builds you could have some bad state in there from a broken build (if a build was canceled while trying to start the git checkout, and if .gitlibs is being cached even if the build failed)
yes, gitlibs is a cache, it is safe to wipe it (or partially wipe it)