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

scripts: refactor compile_thrift.py #186

Merged
merged 4 commits into from
Oct 24, 2018
Merged

Conversation

neverchanje
Copy link
Contributor

@neverchanje neverchanje commented Oct 24, 2018

Formerly in #167 we removed dsn.cg.sh and dsn.generate_code.php, which was used to generate the thrift files. Now we refactor compile_thrift.py to make it work.

btw, the script is formatted under pep8

$ ./compile_thrift.py 
thrift_exe = /home/mi/git/release/pegasus/rdsn/bin/Linux/thrift
root_dir = /home/mi/git/release/pegasus/rdsn

>>> compiling thrift file dsn.layer2.thrift ...
mkdir /home/mi/git/release/pegasus/rdsn/src/output
/home/mi/git/release/pegasus/rdsn/bin/Linux/thrift -gen cpp:moveable_types -out output dsn.layer2.thrift
mv output/dsn.layer2_types.h /home/mi/git/release/pegasus/rdsn/include/dsn/cpp/serialization_helper
mv output/dsn.layer2_types.cpp /home/mi/git/release/pegasus/rdsn/src/core/core
rm -rf /home/mi/git/release/pegasus/rdsn/src/output

>>> compiling thrift file fd.thrift ...
mkdir /home/mi/git/release/pegasus/rdsn/src/dist/failure_detector/output
/home/mi/git/release/pegasus/rdsn/bin/Linux/thrift -gen cpp:moveable_types -out output fd.thrift
mv output/fd_types.h /home/mi/git/release/pegasus/rdsn/include/dsn/dist/failure_detector
rm -rf /home/mi/git/release/pegasus/rdsn/src/dist/failure_detector/output

>>> compiling thrift file replication.thrift ...
mkdir /home/mi/git/release/pegasus/rdsn/src/dist/replication/output
/home/mi/git/release/pegasus/rdsn/bin/Linux/thrift -gen cpp:moveable_types -out output replication.thrift
mv output/replication_types.h /home/mi/git/release/pegasus/rdsn/include/dsn/dist/replication
mv output/replication_types.cpp /home/mi/git/release/pegasus/rdsn/src/dist/replication/common
rm -rf /home/mi/git/release/pegasus/rdsn/src/dist/replication/output

>>> compiling thrift file simple_kv.thrift ...
mkdir /home/mi/git/release/pegasus/rdsn/src/dist/replication/test/simple_kv/output
/home/mi/git/release/pegasus/rdsn/bin/Linux/thrift -gen cpp:moveable_types -out output simple_kv.thrift
rm -rf /home/mi/git/release/pegasus/rdsn/src/dist/replication/test/simple_kv/output

>>> compiling thrift file nfs.thrift ...
mkdir /home/mi/git/release/pegasus/rdsn/src/dist/nfs/output
/home/mi/git/release/pegasus/rdsn/bin/Linux/thrift -gen cpp:moveable_types -out output nfs.thrift
rm -rf /home/mi/git/release/pegasus/rdsn/src/dist/nfs/output

>>> compiling thrift file simple_kv.thrift ...
mkdir /home/mi/git/release/pegasus/rdsn/src/apps/skv/output
/home/mi/git/release/pegasus/rdsn/bin/Linux/thrift -gen cpp:moveable_types -out output simple_kv.thrift
rm -rf /home/mi/git/release/pegasus/rdsn/src/apps/skv/output

>>> compiling thrift file cli.thrift ...
mkdir /home/mi/git/release/pegasus/rdsn/src/dist/cli/output
/home/mi/git/release/pegasus/rdsn/bin/Linux/thrift -gen cpp:moveable_types -out output cli.thrift
mv output/cli_types.h /home/mi/git/release/pegasus/rdsn/include/dsn/dist/cli
rm -rf /home/mi/git/release/pegasus/rdsn/src/dist/cli/output

@neverchanje neverchanje merged commit f01cc7e into XiaoMi:master Oct 24, 2018
vagetablechicken pushed a commit to vagetablechicken/rdsn that referenced this pull request Nov 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants