capnproto / go-capnp

Cap'n Proto library and code generator for Go

Home Page:https://capnproto.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

capnproto.org/go/capnp/v3 v3.0.0-alpha.1 does not work with Bazel v0.29

imcom opened this issue · comments

commented

Hi maintainers,

I got the following error when using bazel with my golang project using capnp. I guess it is simply a compatibility issue. Would you mind to look into it? Thanks in advance

ERROR: Traceback (most recent call last):
        File "/private/var/tmp/_bazel_imcom/d084477fe583c844021171d8c884c610/external/org_capnproto_go_capnp_v3/BUILD.bazel", line 1, column 55, in <toplevel>
                load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_prefix", "go_test", "gazelle")
Error: file '@io_bazel_rules_go//go:def.bzl' does not contain symbol 'go_prefix'
ERROR: /Users/imcom/go/src/gitlab.nexusguard.net/platform/nxflow/proto/BUILD.bazel:3:11: no such target '@org_capnproto_go_capnp_v3//:capnp': target 'capnp' not declared in package '' defined by /private/var/tmp/_bazel_imcom/d084477fe583c844021171d8c884c610/external/org_capnproto_go_capnp_v3/BUILD.bazel and referenced by '//proto:proto'
ERROR: /Users/imcom/go/src/gitlab.nexusguard.net/platform/nxflow/proto/BUILD.bazel:3:11: no such target '@org_capnproto_go_capnp_v3//encoding/text:text': target 'text' not declared in package 'encoding/text' defined by /private/var/tmp/_bazel_imcom/d084477fe583c844021171d8c884c610/external/org_capnproto_go_capnp_v3/encoding/text/BUILD.bazel and referenced by '//proto:proto'
ERROR: /Users/imcom/go/src/gitlab.nexusguard.net/platform/nxflow/proto/BUILD.bazel:3:11: no such target '@org_capnproto_go_capnp_v3//schemas:schemas': target 'schemas' not declared in package 'schemas' (did you mean 'schemas.go'?) defined by /private/var/tmp/_bazel_imcom/d084477fe583c844021171d8c884c610/external/org_capnproto_go_capnp_v3/schemas/BUILD.bazel and referenced by '//proto:proto'
ERROR: Analysis of target '//proto:proto' failed; build aborted: Analysis failed
commented

Just did a bit digging, the latest bazel version that contains go_prefix is v0.12.x, but we are looking at v0.29

Hi @imcom,

We've moved away from bazel-based builds, so I suspect what you are trying to do is not supported. Is there a reason you need Bazel, or can you just use the standard Go toolchain?

commented

Hi @lthibault

Thanks for the prompt reply, I was just evaluating build systems for Go and I happen to have a go project using go-capnp. It is totally fine to use standard Go toolchain and put bazel aside :D , would you mind to shed some lights on your reasons abandoning bazel for your project?

@imcom Short answer: we didn't really see any reason to keep it. It wasn't performing any task that wasn't adequately covered by the standard Go toolchain and the occasional make target.

Glad to know this is not a blocker for you. Please let us know if you hit any other issues 🙂