Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
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() {
}
Attachments
Issue Links
- links to