rules_go | Go rules for Bazel
kandi X-RAY | rules_go Summary
kandi X-RAY | rules_go Summary
Go rules for Bazel
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of rules_go
rules_go Key Features
rules_go Examples and Code Snippets
Community Discussions
Trending Discussions on rules_go
QUESTION
I'm getting started with bazel and trying to generate the protobuf code for golang for an RPC service.
When I try to build it I get the following error:
...ANSWER
Answered 2021-Sep-30 at 14:09UPDATE: it looks surely a version issue: https://github.com/grpc/grpc-go#compiling-error-undefined-grpcsupportpackageisversion
Not a bazel user, but after hours' test, I found your rpc version should be higher:
QUESTION
From gazelle-generated BUILD files, I get the following error when I run bazel build //foo/bar/protos/...:
ERROR: .../foo/bar/protos/BUILD.bazel:15:17: in deps attribute of go_proto_library rule //foo/bar/protos:protos_go_proto: '//baz/quux/api:api_proto' does not have mandatory providers: 'GoLibrary'
Both BUILD files have:
...ANSWER
Answered 2020-Oct-08 at 15:04This error means that //baz/quux/api:api_proto
is the wrong kind of target for the deps
attribute of the go_proto_library
rule (it does not "provide" the right information).
//baz/quux/api:api_proto
is probably a proto_library
target, and should be in the protos
attribute instead of the deps
attribute:
https://github.com/bazelbuild/rules_go/blob/master/proto/core.rst#go_proto_library
QUESTION
I am trying to build a Go application with brazel. It is an existing private GitHub repo (with this location: github.xyz.com/repo-name
) that I am working on, and my aim is to create a binary out of a main.go file that depends on some other Go files for it's methods. This is my BUILD.bazel file inside the folder called e2e where all these go files are present:
ANSWER
Answered 2020-Aug-31 at 06:28I resolved the issue by adding my main.go file in a new folder inside the e2e folder (while keeping the helper files in the e2e folder). This way when I added a dependency of my main.go file to the helper files, it did not lead to a cyclic dependency error.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install rules_go
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page