How bazel bzlmod resolve the deps versions?

36 views
Skip to first unread message

Xiaofeng Wang

unread,
Nov 17, 2024, 8:40:25 PMNov 17
to bazel-discuss
Hi,

I am new to the bazel world, these is a problem when building brpc[1] with bazel. 

The problem is that, bazel selects a non-compatible version of protobuf.

In the MODLES.bazel, required version of protobuf is 3.19.6.
```
bazel_dep(name = 'protobuf', version = '3.19.6', repo_name = 'com_google_protobuf')
```
When build, it selects 27.0.
> WARNING: For repository 'com_google_protobuf', the root module requires module version prot...@3.19.6, but got protobuf@27.0 in the resolved dependency graph.

How to find why bazel select this version of protobuf?

Thanks.

Xiaofeng

unread,
Nov 26, 2024, 9:49:46 AMNov 26
to heisenberg1993, bazel-discuss
Thanks, this is really what I want.

BTW, problem solved by manually checking dependencies of all the
modules, email blocked by google :(

On Mon, Nov 25, 2024 at 8:57 PM heisenberg1993 <bfs...@gmail.com> wrote:
>
> FYI: https://docs.google.com/document/d/1moQfNcEIttsk6vYanNKIy3ZuK53hQUFq1b1r0rmsYVg/edit?tab=t.0#heading=h.keg37p3iyt2h
>
> Too dive in detail, use cmd: bazel mod graph --verbose
>
> Xiaofeng Wang <was...@gmail.com> 于 2024年11月18日周一 上午3:40写道:
>> --
>> You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
>> To view this discussion visit https://groups.google.com/d/msgid/bazel-discuss/dff7e8ff-00e8-4999-9a1c-7832b3df54c2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages