When I run bazel build //..., it produces an error
ERROR: /my-app/students/api.v1/BUILD.bazel:15:17: no such package 'github.com/mwitkow/go-proto-validators': BUILD file not found in any of the following directories. Add a BUILD file to a directory to mark it as a package.
- /my-app/github.com/mwitkow/go-proto-validators and referenced by '/students/api.v1:api_go_proto'
ERROR: Analysis of target '//students/api.v1:api' failed; build aborted: Analysis failed
I would like to make the build work without error. Thank you very much for your help.
I think in BUILD.bazel file, //github.com/mwitkow/go-proto-validators:validators_proto should be @github.com/mwitkow/go-proto-validators:validators_proto, like @go_googleapis//google/api:annotations_proto but it's just a vague idea.
I'm using bazel 4.1.0 to build to project. Current set up:
go.mod file
WORKSPACE file
in repositories.blz file
in students/api.v1/api.proto file
after running
bazel run //:gazelle -- update-repos -from_file=go.mod -to_macro=repositories.bzl%go_repositories -prune=true
andbazel run //:gazelle
it generate students/api.v1/BUILD.bazel file
When I run
bazel build //...
, it produces an errorI would like to make the build work without error. Thank you very much for your help. I think in
BUILD.bazel
file,//github.com/mwitkow/go-proto-validators:validators_proto
should be@github.com/mwitkow/go-proto-validators:validators_proto
, like@go_googleapis//google/api:annotations_proto
but it's just a vague idea.