Open pwaterz opened 2 years ago
bazel version: 3.4.1 go version: 1.15.5
This is happening to me as well. Digging into the bazel cache it looks to me like the target is being sourced from the wrong repository?
deps.bzl
go_repository(
name = "com_google_cloud_go_storage",
importpath = "cloud.google.com/go/storage",
sum = "h1:5NQw6tOn3eMm0oE8vTkfjau18kjL79FlMjy/CHTpmoY=",
version = "v1.18.2",
)
go_repository(
name = "org_golang_google_genproto",
importpath = "google.golang.org/genproto",
sum = "h1:Et6SkiuvnBn+SgrSYXs/BrUpGB4mbdwt4R3vaPIlicA=",
version = "v0.0.0-20220107163113-42d7afdf6368",
)
Looking in my bazel cache at com_google_cloud_go_storage
it looks like it's dep should probably be on the repo @org_golang_google_api
not @org_golang_google_genproto
. For context v1:storage and a bunch of other apis are at the other repository.
"@org_golang_google_api//googleapi",
"@org_golang_google_api//iamcredentials/v1:iamcredentials",
"@org_golang_google_api//iterator",
"@org_golang_google_api//option",
"@org_golang_google_api//option/internaloption",
"@org_golang_google_api//storage/v1:storage",
"@org_golang_google_api//transport",
"@org_golang_google_api//transport/http",
"@org_golang_google_genproto//googleapis/storage/v2:storage",
I'm still pretty novice with bazel and golang. Does the go_repository
macro basically download the source and then inject WORKSPACE and BUILD files to "bazelify" for these third party dependencies?
What version of gazelle are you using?
I tested this on .22, .23, and .24
What version of rules_go are you using?
Tested on respective versions outlined in the README. .24, .28, and .29
What version of Bazel are you using?
4.2.2
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Ubuntu and x86-64.
What did you do?
I updated cloud.google.com/go/storage from v1.6.0 to v1.8.2
What did you expect to see?
I expected my tests to run successfully.
What did you see instead?
The version of genproto in my repositoies is
Which does have googleapis/storage/v2, It appears it's not using the correct version.