-
-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
Something I've been having trouble with is not seeing the same syntax enforcement between protolint, protoc, and the pbtools C code generator.
For example, the following .proto definition will cause an error enforced by protolint and protoc, but not by pbtools:
Enum value defined multiple times in the same message
syntax = "proto3";
message foo
{
enum bar
{
UNSPECIFIED = 0;
}
enum zoo
{
UNSPECIFIED = 0;
}
}
Error:
$ protoc --python_out=. foo.proto
foo.proto:11:5: "UNSPECIFIED" is already defined in "foo".
foo.proto:11:5: Note that enum values use C++ scoping rules, meaning that enum values are siblings of their type, not children of it. Therefore, "UNSPECIFIED" must be unique within "foo", not just within "zoo".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels