[
https://issues.apache.org/jira/browse/THRIFT-4941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16928123#comment-16928123
]
pengzhouhu commented on THRIFT-4941:
------------------------------------
different on first step: delete gen-cpp folder
if we don`t delete gen-cpp folder by ourselves, keep gen-cpp folder exists,
then change ThriftTest.thrift , there will be no any response tips on termnial,
nonthing happened.
User will doubt whether i do the update jobs success.
> thrift compiler will not auto update gen-cpp directory
> ------------------------------------------------------
>
> Key: THRIFT-4941
> URL: https://issues.apache.org/jira/browse/THRIFT-4941
> Project: Thrift
> Issue Type: Bug
> Components: C++ - Compiler
> Affects Versions: 0.13.0
> Environment:
> Reporter: pengzhouhu
> Priority: Major
> Fix For: 0.13.0
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> thrift compiler will not auto update the files in the gen-cpp directory.
> when we call t_generator::generate_program() and init_generator() in
> compiler\cpp\src\thrift\generate\t_generator.cc ,
> 'MKDIR' macro will ignore EEXIST, and throw on any other error, this
> will not give any reponse print on terminal. we used to update and generate
> the .h .cpp files in the whole directory.
> 1. delete the old folder and create new one, generate the file again.
> 2. throw errno directly and exit the terminal.
>
> what`s your opinion about this?
>
> code details:
> {code:java}
> // ignore EEXIST, throw on any other error
> #ifdef _WIN32
> #define MKDIR(x) { int r = _mkdir(x); if (r == -1 && errno != EEXIST) { throw
> (std::string(x) + ": ") + strerror(errno); } }
> #else
> #define MKDIR(x) { int r = mkdir(x, S_IRWXU | S_IRWXG | S_IRWXO); if (r == -1
> && errno != EEXIST) { throw (std::string(x) + ": ") + strerror(errno); } }
> #endif
> {code}
> Thanks.
> Zhouhu.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)