You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Tarun Goyal <jo...@gmail.com> on 2013/04/01 07:00:53 UTC

Re: how to add comments in IDL file that will come in .cpp file and .java file?

i am able to see my comments in .java files but not in .cpp files generated
for thrift.
please help


On Sat, Mar 30, 2013 at 8:31 PM, Jens Geyer <je...@hotmail.com> wrote:

>
> Please have a look at the DocTest.thrift file in the "test" folder.
>
>
> -----Ursprüngliche Nachricht----- From: Tarun Goyal
> Sent: Saturday, March 30, 2013 5:12 AM
> To: user@thrift.apache.org
> Subject: how to add comments in IDL file that will come in .cpp file and
> .java file?
>
>
> Please help
>
> --
> Regards,
> Tarun
>



-- 
Regards,
Tarun

Re: how to add comments in IDL file that will come in .cpp file and .java file?

Posted by Rush Manbert <ru...@manbert.com>.
Hi Tarun,

I don't think the comments have ever made it through to the generated C++ source.

The compiler is not difficult to modify, if you are so inclined, and this is a change that I'm sure would be happily taken back into the project.

In the sources I work from (admittedly old, but I doubt the layout has changed) the file of interest is this: compiler/cpp/src/generate/t_cpp_generator.cc. The corresponding java code generator is next to it, so you just need to compare the two to see how the comments make it into the java code. (I didn't look.)

- Rush

On Apr 1, 2013, at 9:23 PM, Tarun Goyal wrote:

> Hi Roger,
> 
> It is possible for java. I can see comments are coming when i generate java
> files but it is not happening for c++.
> 
> Thanks,
> Tarun
> 
> 
> On Mon, Apr 1, 2013 at 11:39 PM, Roger Meier <ro...@bufferoverflow.ch>wrote:
> 
>> I would love to see the comments from idl file within the header files.
>> There is no option right now. However, it should not be a big story to add
>> it to the Thrift Compiler.
>> 
>> If you have some time, please help to improve it.
>> http://thrift.apache.org/docs/**HowToContribute<http://thrift.apache.org/docs/HowToContribute>
>> 
>> -roger
>> ;-r
>> 
>> Quoting Tarun Goyal <jo...@gmail.com>:
>> 
>> i am able to see my comments in .java files but not in .cpp files
>>> generated
>>> for thrift.
>>> please help
>>> 
>>> 
>>> On Sat, Mar 30, 2013 at 8:31 PM, Jens Geyer <je...@hotmail.com>
>>> wrote:
>>> 
>>> 
>>>> Please have a look at the DocTest.thrift file in the "test" folder.
>>>> 
>>>> 
>>>> -----Ursprüngliche Nachricht----- From: Tarun Goyal
>>>> Sent: Saturday, March 30, 2013 5:12 AM
>>>> To: user@thrift.apache.org
>>>> Subject: how to add comments in IDL file that will come in .cpp file and
>>>> .java file?
>>>> 
>>>> 
>>>> Please help
>>>> 
>>>> --
>>>> Regards,
>>>> Tarun
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Regards,
>>> Tarun
>>> 
>> 
>> 
>> 
> 
> 
> -- 
> Regards,
> Tarun


Re: how to add comments in IDL file that will come in .cpp file and .java file?

Posted by Tarun Goyal <jo...@gmail.com>.
Hi Roger,

It is possible for java. I can see comments are coming when i generate java
files but it is not happening for c++.

Thanks,
Tarun


On Mon, Apr 1, 2013 at 11:39 PM, Roger Meier <ro...@bufferoverflow.ch>wrote:

> I would love to see the comments from idl file within the header files.
> There is no option right now. However, it should not be a big story to add
> it to the Thrift Compiler.
>
> If you have some time, please help to improve it.
> http://thrift.apache.org/docs/**HowToContribute<http://thrift.apache.org/docs/HowToContribute>
>
> -roger
> ;-r
>
> Quoting Tarun Goyal <jo...@gmail.com>:
>
>  i am able to see my comments in .java files but not in .cpp files
>> generated
>> for thrift.
>> please help
>>
>>
>> On Sat, Mar 30, 2013 at 8:31 PM, Jens Geyer <je...@hotmail.com>
>> wrote:
>>
>>
>>> Please have a look at the DocTest.thrift file in the "test" folder.
>>>
>>>
>>> -----Ursprüngliche Nachricht----- From: Tarun Goyal
>>> Sent: Saturday, March 30, 2013 5:12 AM
>>> To: user@thrift.apache.org
>>> Subject: how to add comments in IDL file that will come in .cpp file and
>>> .java file?
>>>
>>>
>>> Please help
>>>
>>> --
>>> Regards,
>>> Tarun
>>>
>>>
>>
>>
>> --
>> Regards,
>> Tarun
>>
>
>
>


-- 
Regards,
Tarun

Re: how to add comments in IDL file that will come in .cpp file and .java file?

Posted by Roger Meier <ro...@bufferoverflow.ch>.
I would love to see the comments from idl file within the header files.
There is no option right now. However, it should not be a big story to  
add it to the Thrift Compiler.

If you have some time, please help to improve it.
http://thrift.apache.org/docs/HowToContribute

-roger
;-r
Quoting Tarun Goyal <jo...@gmail.com>:

> i am able to see my comments in .java files but not in .cpp files generated
> for thrift.
> please help
>
>
> On Sat, Mar 30, 2013 at 8:31 PM, Jens Geyer <je...@hotmail.com> wrote:
>
>>
>> Please have a look at the DocTest.thrift file in the "test" folder.
>>
>>
>> -----Ursprüngliche Nachricht----- From: Tarun Goyal
>> Sent: Saturday, March 30, 2013 5:12 AM
>> To: user@thrift.apache.org
>> Subject: how to add comments in IDL file that will come in .cpp file and
>> .java file?
>>
>>
>> Please help
>>
>> --
>> Regards,
>> Tarun
>>
>
>
>
> --
> Regards,
> Tarun