我想使用 Gazelle 在 Bazel 中管理我的 Go 依赖项(及其依赖项)。运行bazel run //:gazelle update-repos firebase.google.com/go
将正确配置添加go_repository
到我的WORKSPACE
文件中:
go_repository(
name = "com_google_firebase_go",
importpath = "firebase.google.com/go",
sum = "h1:3TdYC3DDi6aHn20qoRkxwGqNgdjtblwVAyRLQwGn/+4=",
version = "v3.13.0+incompatible",
)
但是,这不是开箱即用的。运行bazel build @com_google_firebase_go//:go_default_library
返回错误:
ERROR: /private/var/tmp/_bazel_spencerconnaughton/9b09d78e8f2190e9af61aa37bcab571e/external/com_google_firebase_go/BUILD.bazel:3:11: no such package '@org_golang_google_api//option': The repository '@org_golang_google_api' could not be resolved and referenced by '@com_google_firebase_go//:go'
ERROR: Analysis of target '@com_google_firebase_go//:go_default_library' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.596s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (23 packages loaded, 133 targets configured)
有没有办法告诉瞪羚加载@org_golang_google_api
传递依赖和其他而不需要update-repos
为每个运行?