Make every .bazelrc import the top level .bazelrc #1644
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Makes the Bazel configuration for every test repository consistent with the main repository. Supersedes #1638.
Removes
test_version/.bazel{rc,version}
, sincetest_version.sh
was always copying the top level.bazel{rc,version}
files into the test repo to begin with. Updatesscripts/sync-bazelversion.sh
such that it won't replacetest_version/.bazelversion
on future runs.Also fixes a bug in
test/shell/test_scala_proto_library.sh
whereby it never successfully read the top level.bazelversion
file.Motivation
With this change,
scripts/toggle-workspace.sh
from #1638 isn't really necessary, since this allows changes from the top level.bazelrc
to propagate to all nested repos. I no longer need that script to easily and safely switch betweenWORKSPACE
and Bzlmod while working on changes for #1482.I only realized this while working on my new branch to use the latest abseil-cpp 20240722.0 and protobuf v28.3, which is based on my branch to update to ScalaPB 0.11.17, gRPC 1.68.1, and Guava 33.3.1-jre, which is itself based on #1642.
As an aside, the upshot of that protobuf upgrade work so far:
Later versions of Protobuf appear to require ScalaPB 1.0.0-alpha.1, which causes a single test to hang,
test_scala_version 2.11.12
fromtest_version.sh
. Appears to be anotherProtoScalaPBRule
aspect worker hanging, this time on//src/main/scala/scalarules/test/twitter_scrooge:java_jar_not_on_classpath
.The latest abseil-cpp and protobuf will build under Bazel 6.5.0 with the compiler flags from [6.5.0] Upgrade abseil-cpp to fix build on macos_arm64 bazelbuild/bazel#20785, but those cause protobuf to rebuild even more frequently. These flags aren't required under Bazel 7.4.0, so the problem isn't as pronounced.