I think it's not mentioned in ProtoBuf guide (https://developers.google.com/protocol-buffers/docs/proto3#packages-and-name-resolution)
Proto definition:
message Version {
string version = 1;
}
service Config {
rpc Version(google.protobuf.Empty) returns (Version) {}
}
Error:
services.proto:97:49: "Version" is not a message type.
Perhaps we could update the docs?
The package and name resolution talks mostly about how to implicitly look up types in namespaces.
The case you raised are actually quite common, and I don't think we have a full list of cases where symbol names may conflict. Given the error message is already self-explanatory, I don't think adding a partial conflicting list would add too much value, as users would probably try define the same name and will immediately get the compile error.
The self-explanatory message would be:
rpc "Version" name collides with message Message in line N.
The current message, for me caused a bit of mind fuck, checking if i'm compiling the correct .proto and so on.
Most helpful comment
The self-explanatory message would be:
rpc "Version" name collides with message Message in line N.The current message, for me caused a bit of mind fuck, checking if i'm compiling the correct .proto and so on.