Fixed bazel tests for 7 (#35390)

- Fixed the bazel distrib tests with Bazel 7 by disabling bzlmod option.
- Added a new note for bzlmod to the doc.

Closes #35390

PiperOrigin-RevId: 593816700
pull/35392/head
Esun Kim 11 months ago committed by Copybara-Service
parent 45aecbe355
commit d8fd0c0844
  1. 3
      BUILDING.md
  2. 2
      doc/bazel_support.md
  3. 2
      templates/doc/bazel_support.md.template
  4. 4
      test/distrib/bazel/cpp/.bazelrc
  5. 4
      test/distrib/bazel/python/.bazelrc
  6. 4
      test/distrib/bazel/python_second_test_repo/.bazelrc

@ -112,6 +112,9 @@ $ bazel build :all
$ bazel test --config=dbg //test/...
```
NOTE: If you're using Bazel 7 or newer and working with gRPC, you'll need to turn off bzlmod.
This is because gRPC isn't fully compatible with bzlmod yet. To do this, add --enable_bzlmod=false to your Bazel commands.
NOTE: If you are a gRPC maintainer and you have access to our test cluster, you should use our [gRPC's Remote Execution environment](tools/remote_build/README.md)
to get significant improvement to the build and test speed (and a bunch of other very useful features).

@ -45,3 +45,5 @@ following list:
- [`6.4.0`](https://github.com/bazelbuild/bazel/releases/tag/6.4.0)
- [`7.0.0`](https://github.com/bazelbuild/bazel/releases/tag/7.0.0)
NOTE: gRPC doesn't support bzlmod yet.

@ -48,3 +48,5 @@
% for version in supported_bazel_versions:
- [`${version}`](https://github.com/bazelbuild/bazel/releases/tag/${version})
% endfor
NOTE: gRPC doesn't support bzlmod yet.

@ -1,4 +1,8 @@
# bazelrc file
# Bazel 7 begins to enable module by default which breaks gRPC build.
# Therefore, this option is disabled until gRPC works with bzlmod.
common --enable_bzlmod=false
build --cxxopt='-std=c++14'
build --host_cxxopt='-std=c++14'

@ -1,4 +1,8 @@
# bazelrc file
# Bazel 7 begins to enable module by default which breaks gRPC build.
# Therefore, this option is disabled until gRPC works with bzlmod.
common --enable_bzlmod=false
build --cxxopt='-std=c++14'
build --host_cxxopt='-std=c++14'

@ -1,4 +1,8 @@
# bazelrc file
# Bazel 7 begins to enable module by default which breaks gRPC build.
# Therefore, this option is disabled until gRPC works with bzlmod.
common --enable_bzlmod=false
build --cxxopt='-std=c++14'
build --host_cxxopt='-std=c++14'

Loading…
Cancel
Save