rules_proto icon indicating copy to clipboard operation
rules_proto copied to clipboard

build error when a.proto import b.proto, and the protos under same dir

Open sky92zwq opened this issue 7 months ago • 2 comments

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?

sky92zwq avatar Jan 08 '24 10:01 sky92zwq