bazelbuild / rules_scala

Scala rules for Bazel
Apache License 2.0
363 stars 278 forks source link

Make every .bazelrc import the top level .bazelrc #1644

Closed mbland closed 1 week ago

mbland commented 2 weeks ago

Description

Makes the Bazel configuration for every test repository consistent with the main repository. Supersedes #1638.

Removes test_version/.bazel{rc,version}, since test_version.sh was always copying the top level .bazel{rc,version} files into the test repo to begin with. Updates scripts/sync-bazelversion.sh such that it won't replace test_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 between WORKSPACE 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:

mbland commented 2 weeks ago

Hmm, looks like the test_reproducibility job broke due to a failure to download Bazel. In other words, the breakage is unrelated to this change; all the other test jobs passed.

2024/11/08 23:06:26 Downloading https://releases.bazel.build/6.5.0/release/bazel-6.5.0-linux-x86_64...
2024/11/08 23:06:26 could not download Bazel: failed to download bazel: failed to download bazel:
  could not copy from https://releases.bazel.build/6.5.0/release/bazel-6.5.0-linux-x86_64 to
  /var/lib/buildkite-agent/.cache/bazelisk/downloads/_tmp/download1892374034:
  stream error: stream ID 1; INTERNAL_ERROR; received from peer