Skip to content

Commit 4faf94f

Browse files
authored
Make every .bazelrc import the top level .bazelrc (#1644)
Makes the Bazel configuration for every test repository consistent with the main repository. 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.
1 parent 3ccaeae commit 4faf94f

File tree

13 files changed

+12
-39
lines changed

13 files changed

+12
-39
lines changed

examples/crossbuild/.bazelrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# Remove upon completing Bzlmod compatibility work.
2-
# - https://github.com/bazelbuild/rules_scala/issues/1482
3-
build --noenable_bzlmod
1+
import ../../.bazelrc

examples/scala3/.bazelrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# Remove upon completing Bzlmod compatibility work.
2-
# - https://github.com/bazelbuild/rules_scala/issues/1482
3-
build --noenable_bzlmod
1+
import ../../.bazelrc

examples/semanticdb/.bazelrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# Remove upon completing Bzlmod compatibility work.
2-
# - https://github.com/bazelbuild/rules_scala/issues/1482
3-
build --noenable_bzlmod
1+
import ../../.bazelrc
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
build --enable_platform_specific_config
2-
windows:build --enable_runfiles
3-
4-
# Remove upon completing Bzlmod compatibility work.
5-
# - https://github.com/bazelbuild/rules_scala/issues/1482
6-
build --noenable_bzlmod
1+
import ../../../.bazelrc
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# Remove upon completing Bzlmod compatibility work.
2-
# - https://github.com/bazelbuild/rules_scala/issues/1482
3-
build --noenable_bzlmod
1+
import ../../../.bazelrc
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
build --enable_platform_specific_config
2-
windows:build --enable_runfiles
3-
4-
# Remove upon completing Bzlmod compatibility work.
5-
# - https://github.com/bazelbuild/rules_scala/issues/1482
6-
build --noenable_bzlmod
1+
import ../../../.bazelrc

scripts/sync-bazelversion.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ while IFS="" read repo_marker_path; do
2929
if [[ "$repo_path" != "$repo_marker_path" ]]; then
3030
cp .bazelversion "$repo_path"
3131
fi
32-
done < <(find [A-Za-z0-9]* \( -name "WORKSPACE*" -or -name "MODULE.bazel" \))
32+
done < <(find [A-Za-z0-9]* \( -name "WORKSPACE" -or -name "MODULE.bazel" \))

test/shell/test_scala_proto_library.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ test_scala_proto_show_generator_exception() {
2828
--extra_toolchains=//test/proto/custom_generator:failing_scala_proto_toolchain
2929
}
3030

31-
export USE_BAZEL_VERSION=${USE_BAZEL_VERSION:-$(cat ../../../.bazelversion)}
31+
export USE_BAZEL_VERSION=${USE_BAZEL_VERSION:-$(cat $dir/../../.bazelversion)}
3232
$runner test_scala_proto_library_action_label
3333
$runner test_scala_proto_custom_generator
3434
$runner test_scala_proto_show_generator_exception

test_cross_build/.bazelrc

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# Remove upon completing Bzlmod compatibility work.
2-
# - https://github.com/bazelbuild/rules_scala/issues/1482
3-
build --noenable_bzlmod
1+
# Remove after moving to Bazel 7.
2+
import ../.bazelrc

test_version/.bazelrc

-3
This file was deleted.

test_version/.bazelversion

-1
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# Remove upon completing Bzlmod compatibility work.
2-
# - https://github.com/bazelbuild/rules_scala/issues/1482
3-
build --noenable_bzlmod
1+
import ../../../.bazelrc

third_party/test/proto/.bazelrc

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
# Remove upon completing Bzlmod compatibility work.
2-
# - https://github.com/bazelbuild/rules_scala/issues/1482
3-
build --noenable_bzlmod
1+
import ../../../.bazelrc

0 commit comments

Comments
 (0)