Channels
  • Rasmus Dencker

    Rasmus Dencker

    1 month ago
    Does anyone have experience with Cerbos x Bazel?
  • Charith (Cerbos)

    Charith (Cerbos)

    1 month ago
    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

    1 month ago
    Cool! This is pretty bazel specific, though.. I've met this before, but I don't remember the solution 😅
    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)

    1 month ago
    Oh, are you compiling the Cerbos source with Bazel?
  • Rasmus Dencker

    Rasmus Dencker

    1 month ago
    Nope, I'm compiling something which uses the Cerbos client 😄 💯
    aaaand I'm using gazelle for the deps
  • Charith (Cerbos)

    Charith (Cerbos)

    1 month ago
    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

    1 month ago
    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 😄
  • Charith (Cerbos)

    Charith (Cerbos)

    1 month ago
    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

    1 month ago
    Will do!
    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