]> git.feebdaed.xyz Git - 0xmirror/grpc.git/commit
[bzlmod] Add check to ensure requested versions match selected versions. (#41244)
authoryuanweiz <weizheyuan@google.com>
Tue, 23 Dec 2025 20:10:06 +0000 (12:10 -0800)
committerCopybara-Service <copybara-worker@google.com>
Tue, 23 Dec 2025 20:12:17 +0000 (12:12 -0800)
commit178a00309e47f3d639ae2aa52cc57266d6320b2a
tree097361de11e17f28602b7e8b8b1aa95702dfc0b6
parenta5a83bb52ac8a942d19d88626f4b1bd9e6b5d052
[bzlmod] Add check to ensure requested versions match selected versions. (#41244)

Bzlmod uses Minimal Version Selection algorithm for building dependency graph (see https://bazel.build/external/module#version-selection) which can cause resolved version number to be higher than requested versions. This may lead to nuanced bugs and hide behavioral differences between WORKSPACE and MODULE.bazel settings.

This PR does a few things:
* explicitly turn on --check_direct_dependencies=error for bzlmod tests, so version mismatch will now be an error
* Bump versions in MODULE.bazel to fix tests in `tools/bazelify_tests/test/bazel_build_with_bzlmod_linux.sh`.
* update bzl extensions accordingly to minimize the difference between workspace and bzlmod settings.

<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #41244

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/41244 from yuanweiz:direct_deps dd43d3007e8c88be1fc59cc895d832e430421d97
PiperOrigin-RevId: 848257936
MODULE.bazel
bazel/grpc_deps.bzl
templates/MODULE.bazel.inja
tools/remote_build/linux_bzlmod.bazelrc