zchuango commented on code in PR #3468:
URL: https://github.com/apache/brpc/pull/3468#discussion_r3842089893
##########
example/build_with_bazel_module/MODULE.bazel:
##########
@@ -27,4 +27,15 @@ bazel_dep(name = 'brpc', version = '1.17.0', repo_name =
'apache_brpc')
local_path_override(
module_name = "brpc",
path = "../..",
-)
\ No newline at end of file
+)
+
+single_version_override(
Review Comment:
`single_version_override` is used here to ensure that the example uses the
expected dependency versions during Bazel module resolution.
Since `brpc-example` is the root module and `brpc` is only a dependency, the
overrides defined in `brpc`'s own `MODULE.bazel` do not apply here. Without
overriding these dependencies in the root module, Bazel may not be able to
resolve the required versions from the available registries.
For example, `leveldb 1.23` is only available from the `secretflow`
registry, and `openssl 3.3.2` needs to be resolved as `3.3.2.bcr.1` from that
registry. `single_version_override` allows us to explicitly select the required
version for this example.
I also added comments above these blocks to explain this behavior and noted
that they should be kept in sync with the root `MODULE.bazel` configuration.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]