Bazel crashes when using bzlmod and a registry with an incorrect bazel_registry.json
file
#14437
Labels
area-Bzlmod
Bzlmod-specific PRs, issues, and feature requests
good first issue
help wanted
Someone outside the Bazel team could own this
team-ExternalDeps
External dependency handling, remote repositiories, WORKSPACE file.
type: bug
Description of the problem / feature request:
Bazel crashes due to an internal error when using a bzlmod registry that doesn't correctly specify a
bazel_registry.json
file. The stack-trace printed by Bazel when it crashes is included in the last section below.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
To demonstrate this bug, I created a fork of the bazel-central-repository and made a single commit that deletes the contents of the
bazel_registry.json
file. I also created an bazelmod_example repository that has a dependency onzlib
.To reproduce the bug:
bazelisk
git clone https://github.com/danielmachlab/bzlmod_example
bazelisk build src:hello-world --experimental_enable_bzlmod
to demonstrate the example works when using the bazel-central-repositorybazelisk build src:hello-world --experimental_enable_bzlmod --registry https://danielmachlab.github.io/bazel-central-registry/
to reproduce the bug by using the forked version of the bazel-central-repository, which contained an emptybazel_registry.json
fileWhat operating system are you running Bazel on?
MacOS Big Sur 11.5.2
What's the output of
bazel info release
?If
bazel info release
returns "development version" or "(@non-git)", tell us how you built Bazel.I am using
bazelisk
with a.bazeliskrc
file containing:Have you found anything relevant by searching the web?
I haven't found anything specific to this issue, but I have been referencing the following resources:
bzlmod user guide
Bazel External Dependencies Overhaul Google Doc
Any other information, logs, or outputs that you want to share?
This is the stack trace printed after Bazel crashes:
The text was updated successfully, but these errors were encountered: