You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: no such package '@@gazelle~0.35.0~go_deps~org_golang_google_genproto//googleapis/api/annotations': BUILD file not found in directory 'googleapis/api/annotations' of external repository @@gazelle~0.35.0~go_deps~org_golang_google_genproto. Add a BUILD file to a directory to mark it as a package.
ERROR: /home/user/.cache/bazel/_bazel_zplin/99f39cef3324947e0938218b2f5ab9e8/external/gazelle~0.35.0~go_deps~com_github_pseudomuto_protoc_gen_doc/extensions/google_api_http/BUILD.bazel:3:11: no such package '@@gazelle~0.35.0~go_deps~org_golang_google_genproto//googleapis/api/annotations': BUILD file not found in directory 'googleapis/api/annotations' of external repository @@gazelle~0.35.0~go_deps~org_golang_google_genproto. Add a BUILD file to a directory to mark it as a package. and referenced by '@@gazelle~0.35.0~go_deps~com_github_pseudomuto_protoc_gen_doc//extensions/google_api_http:google_api_http'
ERROR: Analysis of target '@@gazelle~0.35.0~go_deps~com_github_pseudomuto_protoc_gen_doc//cmd/protoc-gen-doc:protoc-gen-doc' failed; build aborted: Analysis failed
INFO: Elapsed time: 1.741s, Critical Path: 0.00s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
The new version separates google.golang.org/genproto/googleapis/api into a separate module, and google.golang.org/[email protected] no longer has the package googleapis/api/annotations. Because the root module doesn't import any Go code transitively from rules_go, the root go.mod file is unaware of the go.mod file from rules_go and the new version of google.golang.org/genproto it introduces.
The particular issue can be worked around by replacing with google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect with google.golang.org/genproto/googleapis/api v0.0.0-20230525153121-6704ef2c6e07 // indirect in the root go.mod file, but we should keep the version of google.golang.org/genproto low to prevent future users running into such issue.
The text was updated successfully, but these errors were encountered:
What version of rules_go are you using?
0.44.0
What version of gazelle are you using?
0.35.0
What version of Bazel are you using?
7.0.0
Does this issue reproduce with the latest releases of all the above?
Yes
What operating system and processor architecture are you using?
Linux arm64
What did you do?
Run
bazel build @com_github_pseudomuto_protoc_gen_doc//cmd/protoc-gen-doc
in the following workspace:What did you expect to see?
Build completes successfully
What did you see instead?
Notes
Despite github.com/pseudomuto/protoc-gen-doc requires google.golang.org/[email protected], rules_go bumps it to a much newer version: https://github.com/bazelbuild/rules_go/blob/32b8404911a3810f57b9be1077092729fb3fe8aa/go.mod#L11
The new version separates google.golang.org/genproto/googleapis/api into a separate module, and google.golang.org/[email protected] no longer has the package googleapis/api/annotations. Because the root module doesn't import any Go code transitively from rules_go, the root go.mod file is unaware of the go.mod file from rules_go and the new version of google.golang.org/genproto it introduces.
The particular issue can be worked around by replacing with
google.golang.org/genproto v0.0.0-20210917145530-b395a37504d4 // indirect
withgoogle.golang.org/genproto/googleapis/api v0.0.0-20230525153121-6704ef2c6e07 // indirect
in the root go.mod file, but we should keep the version of google.golang.org/genproto low to prevent future users running into such issue.The text was updated successfully, but these errors were encountered: