Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

Commit

Permalink
IDL: adapt thrift compilation script to refactored code (#147)
Browse files Browse the repository at this point in the history
  • Loading branch information
shengofsun authored Aug 6, 2018
1 parent 25b4b00 commit 9bd165b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
16 changes: 2 additions & 14 deletions compile_thrift.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"path": "src/dist/replication",
"file_move": {
".types.h _types.h": "include/dsn/dist/replication",
"_types.cpp": "src/dist/replication/client_lib"
"_types.cpp": "src/dist/replication/common"
},
"include_fix": {
"_types.h": {
Expand Down Expand Up @@ -86,22 +86,11 @@
},
{
"name": "nfs",
"path": "src/apps/nfs",
"file_move": {
".types.h _types.h": "include/dsn/tool/nfs"
},
"path": "src/dist/nfs",
"include_fix": {
"_types.h": {
"add": ["<dsn/service_api_cpp.h>"],
"remove": ["\"dsn_types.h\""]
},
"_types.cpp": {
"add": ["<dsn/tool/nfs.h>"],
"remove": ["\"nfs_types.h\""]
},
".types.h": {
"add": ["<dsn/tool/nfs/nfs_types.h>"],
"remove": ["\"nfs_types.h\""]
}
}
},
Expand Down Expand Up @@ -433,7 +422,6 @@ def add_hook(name, path, func, args):

ctor_kv_pair = " kv_pair(const std::string& _key, const std::string& _val): key(_key), value(_val) {\n }"
ctor_configuration_proposal_action = " configuration_proposal_action(::dsn::rpc_address t, ::dsn::rpc_address n, config_type::type tp): target(t), node(n), type(tp) {}"
add_hook("deploy_svc", "src/dist/deployment_service", remove_struct_define_hook, ["deploy_svc_types.h", "cluster_type", "service_status"])
add_hook("simple_kv", "src/apps/skv", constructor_hook, ["simple_kv_types.h", "kv_pair", ctor_kv_pair])
add_hook("replication", "src/dist/replication", constructor_hook, ["replication_types.h", "configuration_proposal_action", ctor_configuration_proposal_action])
add_hook("dsn.layer2", "src", replace_hook, ["dsn.layer2_types.h", {r"dsn\.layer2_TYPES_H": 'dsn_layer2_TYPES_H'}])
Expand Down
1 change: 1 addition & 0 deletions src/dist/nfs/nfs.types.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once
#include <dsn/service_api_cpp.h>
#include <dsn/cpp/serialization.h>

#include "nfs_types.h"

namespace dsn {
Expand Down

0 comments on commit 9bd165b

Please sign in to comment.