[ https://issues.apache.org/jira/browse/THRIFT-5168?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jens Geyer resolved THRIFT-5168. -------------------------------- Fix Version/s: 0.14.0 Resolution: Fixed > Useless generated code when .thrift file only has service type > -------------------------------------------------------------- > > Key: THRIFT-5168 > URL: https://issues.apache.org/jira/browse/THRIFT-5168 > Project: Thrift > Issue Type: Improvement > Components: C++ - Compiler > Reporter: Zezeng Wang > Assignee: Zezeng Wang > Priority: Major > Fix For: 0.14.0 > > Time Spent: 10m > Remaining Estimate: 0h > > When .thrift file only has service type, the generated code in _types.xx and > _constants.xx is useless. > > eg: > *test.thrift:* > service Foobar { > void Test(1: i32 someValue = 42) > } > > *test_types.h:* > /** > *Autogenerated by Thrift Compiler (0.14.0) > *DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING > *@generated > */ > #ifndef test_TYPES_H > #define test_TYPES_H > #include <iosfwd> > #include <thrift/Thrift.h> > #include <thrift/TApplicationException.h> > #include <thrift/TBase.h> > #include <thrift/protocol/TProtocol.h> > #include <thrift/transport/TTransport.h> > #include <functional> > #include <memory> > > > #endif > > > *test_types.cpp:* > /** > *Autogenerated by Thrift Compiler (0.14.0) > *DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING > *@generated > */ > #include "test_types.h" > #include <algorithm> > #include <ostream> > #include <thrift/TToString.h> > > > *test_constants.h:* > /** > *Autogenerated by Thrift Compiler (0.14.0) > *DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING > *@generated > */ > #ifndef test_CONSTANTS_H > #define test_CONSTANTS_H > #include "test_types.h" > > class testConstants > { public: testConstants(); } > ; > extern const testConstants g_test_constants; > > #endif > > > *test_constants.cpp:* > /** > *Autogenerated by Thrift Compiler (0.14.0) > *DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING > *@generated > */ > #include "test_constants.h" > > const testConstants g_test_constants; > testConstants::testConstants() { > } > -- This message was sent by Atlassian Jira (v8.3.4#803005)