RPC Generated ENUM Types do not have a type prefix appended to their name
Closed this issue · 1 comments
Frisbee RPC Generates Proto3 Enums with the exact same name as defined in the proto3 file.
So I might have two enums:
enum Enum1 {
Pending = 0;
Complete = 1;
}
enum Enum2 {
Pending = 0;
Complete = 1;
}
And when Frisbee RPC generates them, it will generate variables with the same name - Pending
and Complete
. When it tries to generate the code for Enum2
, it will run into an error because the generated variable name is the same as the variable name generated for Enum1
.
To solve this, we should append the type name Enum1
or Enum2
to the generated variable name - so instead of generating a variable called Pending
, we generate one called Enum1Pending
.
Marking this as "WontFix" because according to the proto3
spec you can't define Enum types who's values have the same names. So this type of collision cannot occure in a proto3
file that conforms to the spec.