Go语言 如何使用`bazel cquery`找出谁带来了外部依赖?

cgvd09ve  于 2023-08-01  发布在  Go
关注(0)|答案(1)|浏览(104)

我的bazel构建失败,并出现以下错误

link: package conflict error: github.com/golang/protobuf/ptypes/timestamp: multiple copies of package passed to linker:
    @io_bazel_rules_go//proto/wkt:timestamp_go_proto
    @com_github_golang_protobuf//ptypes/timestamp:timestamp
Set "importmap" to different paths or use 'bazel cquery' to ensure only one
package with this path is linked.

字符串
在错误消息中,我看到use 'bazel cquery' to ensure only one package,我如何才能找到谁使用bazel cquery带来/使用@com_github_golang_protobuf//ptypes/timestamp:timestamp

hivapdat

hivapdat1#

找到查询了

bazel cquery "somepath(//..., @com_github_golang_protobuf//ptypes/timestamp:timestamp)"

字符串

相关问题