Title
#help
Rasmus Dencker

Rasmus Dencker

05/27/2022, 11:23 AM
Does anyone have experience with Cerbos x Bazel?
Charith (Cerbos)

Charith (Cerbos)

05/27/2022, 11:38 AM
Hi @Rasmus Dencker I am not a Bazel expert, but, if you tell me what you're trying to do, I can probably give you some pointers from a Cerbos point of view
Rasmus Dencker

Rasmus Dencker

05/27/2022, 11:39 AM
Cool! This is pretty bazel specific, though.. I've met this before, but I don't remember the solution 😅
11:39 AM
compilepkg: missing strict dependencies:
      [redacted path]/external/com_github_cerbos_cerbos/internal/namer/namer.go: import of "<http://github.com/cerbos/cerbos/api/genpb/cerbos/policy/v1|github.com/cerbos/cerbos/api/genpb/cerbos/policy/v1>"
No dependencies were provided.
Charith (Cerbos)

Charith (Cerbos)

05/27/2022, 11:41 AM
Oh, are you compiling the Cerbos source with Bazel?
Rasmus Dencker

Rasmus Dencker

05/27/2022, 11:43 AM
Nope, I'm compiling something which uses the Cerbos client 😄 💯
11:43 AM
aaaand I'm using gazelle for the deps
Charith (Cerbos)

Charith (Cerbos)

05/27/2022, 11:48 AM
OK, I am completely out of my depth here because I haven't used Bazel in years 😄 Presumably, you have already used
gazelle-update-repos
to import external deps from
go.mod
?
Rasmus Dencker

Rasmus Dencker

05/27/2022, 11:51 AM
Yup, I do! But there's something around deps of deps in certain situations, I don't totally grasp it yet 😄
11:54 AM
Thanks for the effort tho 😄
Charith (Cerbos)

Charith (Cerbos)

05/27/2022, 11:54 AM
Yeah, it's pretty mind bending. Sorry I can't be of much help here. If you find the solution, please post here so that others can benefit from your wisdom too.
Rasmus Dencker

Rasmus Dencker

05/27/2022, 11:55 AM
Will do!
10:04 AM
Finally solved it. I need to add
-build_file_proto_mode=disable_global
to my gazelle update repos command. I'm not sure what the exact meaning is, but it solved it; here's a link to a github issue that describes another problem with the same solution: https://github.com/bazelbuild/rules_go/issues/2805#issuecomment-775614836