我正在嘗試使用 bazel 運(yùn)行一些 grpc 測(cè)試。我"google.golang.org/grpc/credentials/insecure"習(xí)慣不安全地?fù)芴?hào)。運(yùn)行時(shí)bazel test ...,出現(xiàn)以下錯(cuò)誤:no such package '@org_golang_google_grpc//credentials/insecure': BUILD file not found in directory 'credentials/insecure' of external repository @org_golang_google_grpc. Add a BUILD file to a directory to mark it as a package. and referenced by '//go/internal/handlers/helloworld:helloworld_test'我正在用 gazelle 生成我的 BUILD 文件,它為 go_test 輸出這個(gè)go_test( name = "helloworld_test", srcs = ["helloworld_test.go"], deps = [ ":helloworld", "//protos/helloworld", "@com_github_stretchr_testify//assert", "@org_golang_google_grpc//:go_default_library", "@org_golang_google_grpc//credentials/insecure", "@org_golang_google_grpc//test/bufconn", "@org_uber_go_zap//:zap", "@org_uber_go_zap//zaptest", ],)我的 go.mod 文件包含 dep: google.golang.org/grpc v1.47.0我的 deps.bzl 是由 gazelle 自動(dòng)生成的:go_repository( name = "org_golang_google_grpc", importpath = "google.golang.org/grpc", sum = "h1:9n77onPX5F3qfFCqjy9dhn8PbNQsIKeVU04J9G7umt8=", version = "v1.47.0",)我錯(cuò)過了什么?
- 1 回答
- 0 關(guān)注
- 290 瀏覽
添加回答
舉報(bào)
0/150
提交
取消