You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jens Geyer (JIRA)" <ji...@apache.org> on 2015/03/03 20:20:05 UTC

[jira] [Comment Edited] (THRIFT-3013) make thrift compiler accept a list of input files

    [ https://issues.apache.org/jira/browse/THRIFT-3013?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14345559#comment-14345559 ] 

Jens Geyer edited comment on THRIFT-3013 at 3/3/15 7:20 PM:
------------------------------------------------------------

Hi,

say, you have 2 Thrift IDL files, like with the tutorial. One {{#include}}s the other. In that case, you call {{thrift -gen whatever -r NameOfTheOuterFile.thrift}} to generate the code recursively. The key is the {{-r}} switch here.

RFe your problem: It should even work if you set up a dummy IDL file file that only holds a bunch of {{#includes}}. I never tried that, but I can't think of a reason why it shouldn't work.


was (Author: jensg):
Hi,

say, you have 2 Thrift IDL files, like with the tutorial. One {{#include}}s the other. In that case, you call {{thrift -gen whatever -r NameOfTheOuterFile.thrift}} to generate the code recursively. It should even work if you set up an IDL file that only holds a bunch of {{#includes}}. I never tried that, but I can't think of a reason why it shouldn't work.

> make thrift compiler accept a list of input files
> -------------------------------------------------
>
>                 Key: THRIFT-3013
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3013
>             Project: Thrift
>          Issue Type: New Feature
>          Components: Compiler (General)
>    Affects Versions: 0.9.2
>            Reporter: John Wang
>
> At present, customer could specify one input file to the thrift compiler.  There are maybe two approaches to support multiple input files.
> Approach 1: Improve the option parser in compiler/cpp/src/main.cc.  Maybe we can borrow code from GUN's getopt_long.
> Approach 2: Offer uses a maven plugin which can help them to iterate through a list of input files.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)