Open
Description
Expected behavior
Apache Thrift defines a list of reserved words that apparently cannot be used as field identifiers: https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=compiler/cpp/src/thrift/thriftl.ll;hb=e1832c354391deb0e0ce94a62ff32e8ce1c83fd3#l273
Therefore, I expect Scrooge to fail to compile a .thrift file with a field named delete
. Failing that I expect a clear warning that the thrift file may be incompatible with other Thrift implementations.
Actual behavior
We have been using a Scrooge-compiled Thrift file in a production Java system for a while:
struct ThingMessage {
//...
200: optional bool delete
//...
However, we are unable to use Apache Thrift's python generator to build an ops tool to observe these messages:
thrift --gen py -I .../ThingMessage.thrift:35
[ERROR: .../ThingMessage.thrift:35] (last token was 'delete')
Cannot use reserved language keyword: "delete"