rules_proto
rules_proto copied to clipboard
build error when a.proto import b.proto, and the protos under same dir
here is my dir layout:
a.proto depends on b.proto, so import b.proto in a.proto.
├── proto
│ ├── BUILD
│ ├── CMakeLists.txt
│ ├── a.proto
│ └── b.proto
├── src
│ ├── BUILD
│ └── main.cc
├── test
│ ├── BUILD
│ ├── main.cc
├── BUILD
├── CMakeLists.txt
├── README.md
└──WORKSPACE
bazel build got error:
proto/a.proto:5:1: Import "b.proto" was not found or had errors.
but cmake works fine.
why should I add import proto/b.proto in a.proto, but just import b.proto?
@alexeagle, @thesayyn can you triage?
why should I add
import proto/b.protoin a.proto, but justimport b.proto
afaik every import statement has to be relative to the workspace root if you are not using strip_import_prefix so this works as intended.