Open jaqx0r opened 1 day ago
Running git init /home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/hedron_compile_commands~
from a shell doesn't trigger a SIGABRT
, and succeeds as expected:
slab% git init "/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/hedron_compile_commands~"
Initialized empty Git repository in /home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/hedron_compile_commands~/.git/
This might be the same as https://github.com/bazelbuild/bazel/issues/24199 but unlike that bug I don't have GIT_DIR
set anywhere in the environment, at least that I can tell; also the reported error is different.
I set a .bazeliskrc
in the top level with the following content:
USE_BAZEL_VERSION=8.0.0-pre.20240925.4
and received the same error:
slab% bazel info
2024/11/13 10:57:36 Downloading https://releases.bazel.build/8.0.0/rolling/8.0.0-pre.20240925.4/bazel-8.0.0-pre.20240925.4-linux-x86_64...
2024/11/13 10:57:36 Skipping basic authentication for releases.bazel.build because no credentials found in /home/jaq/.netrc
Downloading: 57 MB out of 57 MB (100%)
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
INFO: Repository hedron_compile_commands+ instantiated at:
<builtin>: in <toplevel>
Repository rule git_repository defined at:
/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git.bzl:189:33: in <toplevel>
ERROR: /home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git_worker.bzl:210:9: An error occurred during the fetch of repository 'hedron_compile_commands+':
Traceback (most recent call last):
File "/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git.bzl", line 180, column 35, in _git_repository_implementation
update = _clone_or_update_repo(ctx)
File "/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git.bzl", line 43, column 20, in _clone_or_update_repo
git_ = git_repo(ctx, directory)
File "/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 98, column 12, in git_repo
_update(ctx, git_repo)
File "/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 114, column 9, in _update
init(ctx, git_repo)
File "/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 131, column 15, in init
_error(ctx.name, cl, st.stderr)
File "/home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 210, column 9, in _error
fail("error running '%s' while working with @%s:\n%s" % (command_text, name, stderr))
Error in fail: error running 'git init /home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/hedron_compile_commands+' while working with @hedron_compile_commands+:
ERROR: error running 'git init /home/jaq/.cache/bazel/_bazel_jaq/84edce96f0eb3d1bc9a9c0e9ceeea635/external/hedron_compile_commands+' while working with @hedron_compile_commands+:
Description of the bug:
bazel cannot fetch a
bazel_dep
with agit_override
.Which category does this issue belong to?
Core
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Install bazel 7.4.1 with bazelisk 1.19.0, per the version above.
Create a new directory, e.g.
mkdir -p ~/src/test
Copy the text below into
~/src/test/MODULE.bazel
:Run
bazel info
and observe:I have patched
git_worker.bzl
locally to emit the status code, relevant lines copied here:Which operating system are you running Bazel on?
Debian GNU/Linux "sid"
What is the output of
bazel info release
?release 7.4.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
Yes, but no-one else seems to have encountered this error.
I am trying to figure out how to get the process environment that
ctx.execute
runs in so I can try to reproduce this outside of bazel, to understand why git is receiving a SIGABRT.Any other information, logs, or outputs that you want to share?
No response