i have a use case where a first level of proto file declares a set of enum values and the secondary proto file that imports the primary level proto file, declares another set of enum values composed using the enum values from first level proto file.
first.proto:
syntax = "proto3";
enum Type {
INVALID = 0;
NUMERIC = 0xA0000;
STATE = 0xB0000;
EVENT = 0xC0000;
BLOB = 0xD0000;
};
second.proto:
syntax = "proto3";
import "first.proto";
enum ID {
ID_INVALID = 0;
ABC = NUMERIC | 0x1;
DEF = STATE | 0x2;
};
when second.proto is compiled, it fails with error:
second.proto:5:12: Expected integer.
second.proto:6:12: Expected integer.
Any suggestions on how to workaround this problem?
Thanks,
Phani