quick-protobuf
quick-protobuf copied to clipboard
pb-rs only checks for message/enum definitions one level up
I noticed that pb-rs
fails to compile a number of .proto schema files due to it only looking for message and enum definitions one level up. Other compilers do not seem to have a problem when the messages are further away than one level of their user.
This can be experienced e.g. with https://raw.githubusercontent.com/BroadbandForum/usp/master/specification/usp-msg.proto
The reported error is:
pb-rs ./usp-msg.proto
pb-rs fatal error
- Could not find message or enum ParameterError
As a workaround one could move all reported messages right next to their user but since other compilers do not take offence this would be a rather awkward workaround.
I'm having the same issue.
Same
same
same
Still running into this. I tried playing around with fixing it here in https://github.com/tafia/quick-protobuf/blob/master/pb-rs/src/types.rs#L2201 but no luck in the little time I had
I have the problem of it not recognizing any of the include paths I have specified, this works perfectly regularly with all other protobuf compilers and with rust-protobuf
See https://github.com/HiceS/mirabuf for example of files that don't work with the compiler
- Example (Fails on Info Import) :
pb-rs --hashrown -I . --output_directory ./libs/rust assembly.proto
- Example (success) :
pb-rs --hashrown -I . --output_directory ./libs/rust types.proto
Even specifying the Include directory with relative and with absolute paths cannot find the first import, only works on the files with no imports.
As a side note it looks like the public
tag on the import function is not officially recognized ?
- example
import public "types.proto"