https://cerbos.dev logo
#help
Title
# help
r

Rasmus Dencker

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

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
r

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 😅
Copy code
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.
c

Charith (Cerbos)

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

Rasmus Dencker

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

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
?
r

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 😄
Thanks for the effort tho 😄
c

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.
r

Rasmus Dencker

05/27/2022, 11:55 AM
Will do!
🙌 1
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
👍 2
9 Views