Description:
When using bb in a bzlmod-only workspace (has MODULE.bazel but no WORKSPACE file), the CLI warns that the workspace .bazelrc is "no longer being read", even though vanilla bazel reads it correctly from the same directory.
Environment:
- bb version: 5.0.339
- Bazel version: 8.5.1
- OS: macOS (arm64)
- Workspace: bzlmod-only (MODULE.bazel present, no WORKSPACE or WORKSPACE.bazel)
Steps to reproduce:
- Have a bzlmod-only workspace with a
.bazelrc at the project root
- Have a user
~/.bazelrc
- Run any bb command, e.g.:
bb build //some:target
### Expected behavior:
No warning. .bazelrc is at the workspace root and should be read as a standard rc file (same as bazel does).
Actual behavior:
WARNING: The following rc files are no longer being read, please transfer their contents or import their path into one of the standard rc files:
/path/to/workspace/.bazelrc
Diagnosis with --client_debug:
With vanilla bazel:
Looking for the following rc files: /etc/bazel.bazelrc, /path/to/workspace/.bazelrc, ~/.bazelrc
Parsing the RcFile /path/to/workspace/.bazelrc
With bb:
Looking for the following rc files:
(empty — finds none)
bb appears to fail to resolve the workspace root in bzlmod-only projects, so it finds zero standard rc file locations and treats the workspace .bazelrc as a legacy/non-standard path.
### Workaround:
Adding try-import %workspace%/.bazelrc to ~/.bazelrc causes the config to be loaded, but the spurious warning still appears.
#11846 is possibly related
Description:
When using bb in a bzlmod-only workspace (has MODULE.bazel but no WORKSPACE file), the CLI warns that the workspace .bazelrc is "no longer being read", even though vanilla bazel reads it correctly from the same directory.
Environment:
Steps to reproduce:
.bazelrcat the project root~/.bazelrcbb build //some:target### Expected behavior:
No warning.
.bazelrcis at the workspace root and should be read as a standard rc file (same as bazel does).Actual behavior:
Diagnosis with --client_debug:
With vanilla bazel:
With bb:
bb appears to fail to resolve the workspace root in bzlmod-only projects, so it finds zero standard rc file locations and treats the workspace .bazelrc as a legacy/non-standard path.
### Workaround:
Adding
try-import %workspace%/.bazelrc to ~/.bazelrccauses the config to be loaded, but the spurious warning still appears.#11846 is possibly related