Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
4.0.0
Description
When generating code, the Thrift compiler has a "-strict" option that errors out for certain warnings. Specifically, it errors out when there are implicit field keys:
pwarning(1, "No field key specified for %s, resulting protocol may have conflicts or not be backwards compatible!\n", $6); if (g_strict >= 192) { yyerror("Implicit field keys are deprecated and not allowed with -strict"); exit(1); }
https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/thrifty.yy#L824-L828
This is a warning that has been introduced in the past (see HIVE-27103 and HIVE-20365)
I think that it would be useful to add "-strict" to the arguments for Thrift code generation. It would prevent the introduction of new compatibility issues, because the command would fail rather than generating a warning that is easy to miss.
The current Thrift files already work with -strict, so this should be a painless thing.
Attachments
Issue Links
- relates to
-
HIVE-20365 Fix warnings when regenerating thrift code
- Resolved
-
HIVE-27103 Thrift compilation warnings on drop_dataconnector()
- Closed
- links to