Repository navigation
Closed
Description
After updating gazelle to 0.48.0, I'm seeing the following issue when running bazel run //:gazelle
$ bazel run //:gazelle
Starting local Bazel server (9.0.0) and connecting to it...
INFO: Invocation ID: fad4bfa8-efb4-431c-b16d-3eac34f8b0aa
DEBUG: /Users/kevinh/Library/Caches/bazel/_bazel_kevinh/2951c33f4d1cb4dd3b7a5b6968513c86/external/gazelle+/internal/bzlmod/go_deps.bzl:819:18: No sum for github.com/bazel-contrib/bazel-gazelle/v2@2.0.0-1 found, run bazel run @rules_go//go -- mod tidy to generate it
INFO: Repo gazelle++non_module_deps+bazel_gazelle_go_repository_tools defined by rule go_repository_tools in @@gazelle+//internal:go_repository_tools.bzl
ERROR: /Users/kevinh/Library/Caches/bazel/_bazel_kevinh/2951c33f4d1cb4dd3b7a5b6968513c86/external/gazelle+/internal/go_repository_tools.bzl:113:13: An error occurred during the fetch of repository 'gazelle++non_module_deps+bazel_gazelle_go_repository_tools':
Traceback (most recent call last):
File "/Users/kevinh/Library/Caches/bazel/_bazel_kevinh/2951c33f4d1cb4dd3b7a5b6968513c86/external/gazelle+/internal/go_repository_tools.bzl", line 113, column 13, in _go_repository_tools_impl
fail("failed to build tools: " + result.stderr)
Error in fail: failed to build tools: error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
ERROR: no such package '@@gazelle++go_deps+com_github_bazelbuild_buildtools//build': failed to build tools: error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
ERROR: /Users/kevinh/Library/Caches/bazel/_bazel_kevinh/2951c33f4d1cb4dd3b7a5b6968513c86/external/gazelle+/merger/BUILD.bazel:3:11: @@gazelle+//merger:merger depends on @@gazelle++go_deps+com_github_bazelbuild_buildtools//build:build in repository @@gazelle++go_deps+com_github_bazelbuild_buildtools which failed to fetch. no such package '@@gazelle++go_deps+com_github_bazelbuild_buildtools//build': failed to build tools: error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
error obtaining VCS status: exit status 128
Use -buildvcs=false to disable VCS stamping.
ERROR: Analysis of target '//:gazelle' failed; build aborted: Analysis failed
INFO: Elapsed time: 14.315s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target
FAILED:
Fetching repository @@rules_cc++cc_configure_extension+local_config_cc; starting 4s
I've tried adding the following to .bazelrc to no avail
common --repo_env=GOFLAGS=-buildvcs=false
common --action_env=GOFLAGS=-buildvcs=false
I cannot reproduce in 0.47.0, so it must be some changes in this new release.
Metadata
Metadata
Assignees
Labels
No labels
Activity
jayconrod commentedon Apr 5, 2026
Could you give more information to help us reproduce this? I haven't seen this error before in this place.
Are you running Gazelle in an environment where
gitis installed but is not configured (maybe committer email or name is not configured)?gitexits with 128 sometimes in a case like that.We could set
-buildvcs=falseby default in this position, but it would be good to confirm the root cause.jayconrod commentedon Apr 5, 2026
Maybe a
.gitdirectory in some parent directory of where the repository rule is executed?go_repository_tools: build with -buildvcs=false
go_repository_tools: build with -buildvcs=false (#2324)
go_repository_tools: build with -buildvcs=false (bazel-contrib#2324)