从瞪羚生成的构建文件中,我在运行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'
这两个构建文件都有:
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")我见过https://github.com/bazelbuild/rules_go/blob/master/go/providers.rst,但它更让人困惑。
我也问了戈菲斯斯拉克,但那里的交通非常少。
发布于 2020-10-08 15:04:54
此错误意味着//baz/quux/api:api_proto是go_proto_library规则的deps属性的错误目标(它没有“提供”正确的信息)。
//baz/quux/api:api_proto可能是一个proto_library目标,应该在protos属性中而不是deps属性:https://github.com/bazelbuild/rules_go/blob/master/proto/core.rst#go_proto_library中。
https://stackoverflow.com/questions/64263317
复制相似问题