Closed sebastianhaberey closed 6 years ago
Please include a (minimalized) IDL file that triggers the error.
The following IDL generates ok but throws the above error on compilation of the Java module:
module foo
{
struct ComplexPower
{
double p_MW;
double q_Mvar;
};
}
This is due to assumptions of the Protobuf Compiler on naming conventions. Cf. https://developers.google.com/protocol-buffers/docs/javatutorial:
Notice how these accessor methods use camel-case naming, even though the .proto file uses lowercase-with-underscores. This transformation is done automatically by the protocol buffer compiler so that the generated classes match standard Java style conventions.
com.google.common.base.CaseFormat can be used for converting
See also #90
Note that the names in your example do not follow any common naming convention (camelCase, PascalCase, lower_snake_case, UPPER_SNAKE_CASE). This might be impossible to support properly, even if we allow using SnakeCase in the IDL file.
I will try to fix this anyway.
Fixed by #96
There are still some issues, e.g. with the BTC.GA.FieldLink test case.
The error below was thrown during compilation of the generated source code. Removing the underscores in member names fixed it.