Not support: Import proto files which defines enum
armyshu opened this issue · 1 comments
armyshu commented
TestEnum.proto file:
package Personal;
enum PhoneType {
MOBILE = 0;
HOME = 1;
WORK = 2;
}
and AddressBook.proto file:
import "TestEnum.proto";
package Personal;
message Person {
required string name = 1;
required int32 id = 2;
optional string email = 3;
message PhoneNumber {
required string number = 1;
optional PhoneType type = 2 [default = HOME];
}
repeated PhoneNumber phone = 4;
}
message AddressBook {
repeated Person List = 1;
}
when generate code, error occurs:
AddressBook.proto(12,14): error CS001: Field type "PhoneType" not found for field type in message Personal.Person.PhoneNumber
armyshu commented
Sorry, I used the old binary generator version, and this feature has not been implemented. I clone all the sources, and build the latest generator, then it works. ^_^