You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Diwaker Gupta (JIRA)" <ji...@apache.org> on 2011/07/08 22:07:17 UTC

[jira] [Created] (THRIFT-1233) Remove unused include in generated C++ code

Remove unused include in generated C++ code
-------------------------------------------

                 Key: THRIFT-1233
                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
             Project: Thrift
          Issue Type: Improvement
          Components: C++ - Compiler
         Environment: Ubuntu 11.04, latest trunk.
            Reporter: Diwaker Gupta
            Priority: Trivial


When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.

Patch available for review here:
https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13070050#comment-13070050 ] 

Hudson commented on THRIFT-1233:
--------------------------------

Integrated in Thrift #193 (See [https://builds.apache.org/job/Thrift/193/])
    Thrift-1233: Remove unused include in generated C++ code
Client: c++
Patch: Diwaker Gupta

Removing unused include of TTransportUtils.


> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch, thrift-1233.2.tgz
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "alexandre parenteau (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

alexandre parenteau reopened THRIFT-1233:
-----------------------------------------

      Assignee: Jake Farrell  (was: Diwaker Gupta)

This change breaks the cob style compilation, here is an example below.

The problem seems to be that TMemoryBuffer definition is not getting included.

I'd suggest replace the original:

#include <transport/TTransportUtils.h>

by:

#include <transport/TBufferTransports.h>

Example:

In file included from ...sources/thrift/gen-cpp/Imaging.cpp:6:0:
...sources/thrift/gen-cpp/Imaging.h:435:22: error: 'TMemoryBuffer' is not a member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:435:22: error: 'TMemoryBuffer' is not a member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:435:64: error: template argument 1 is invalid
...sources/thrift/gen-cpp/Imaging.h:436:22: error: 'TMemoryBuffer' is not a member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:436:22: error: 'TMemoryBuffer' is not a member of 'apache::thrift::transport'
...sources/thrift/gen-cpp/Imaging.h:436:64: error: template argument 1 is invalid
...sources/thrift/gen-cpp/Imaging.h: In constructor 'imaging::ImagingCobClient::ImagingCobClient(boost::shared_ptr<apache::thrift::async:\
:TAsyncChannel>, apache::thrift::protocol::TProtocolFactory*)':


> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13072975#comment-13072975 ] 

Hudson commented on THRIFT-1233:
--------------------------------

Integrated in Thrift #195 (See [https://builds.apache.org/job/Thrift/195/])
    THRIFT-1233 Remove unused include in generated C++ code
Note:  revert patch and include transport/TBufferTransports.h
Patch: Alexandre Parenteau

roger : http://svn.apache.org/viewvc/?view=rev&rev=1151967
Files : 
* /thrift/trunk/compiler/cpp/src/generate/t_cpp_generator.cc


> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: alexandre parenteau
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch, thrift-1233.2.tgz
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "alexandre parenteau (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

alexandre parenteau updated THRIFT-1233:
----------------------------------------

    Attachment: thrift-1233.2.tgz

@Diwaker: certainly! Find enclosed a description of the problem, the .thrift file, the generated file, and the new proposed patch

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch, thrift-1233.2.tgz
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Diwaker Gupta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067747#comment-13067747 ] 

Diwaker Gupta commented on THRIFT-1233:
---------------------------------------

@alexandre: Can you provide some more details about your build (include path etc?). I've built Thrift compiled C++ code with cob_style enabled and have not seen this issue.

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Diwaker Gupta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diwaker Gupta reassigned THRIFT-1233:
-------------------------------------

    Assignee: Jake Farrell

Bump.

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13064786#comment-13064786 ] 

Jake Farrell commented on THRIFT-1233:
--------------------------------------

Code looks fine, please attach patch for asf inclusion

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Diwaker Gupta (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diwaker Gupta updated THRIFT-1233:
----------------------------------

    Attachment: THRIFT-1233.patch

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>         Attachments: THRIFT-1233.patch
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Roger Meier (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roger Meier resolved THRIFT-1233.
---------------------------------

    Resolution: Fixed
      Assignee: alexandre parenteau  (was: Jake Farrell)

reproduced Alexandre's issue and added the proposed include:

#include <transport/TBufferTransports.h>

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: alexandre parenteau
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch, thrift-1233.2.tgz
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067741#comment-13067741 ] 

Jake Farrell commented on THRIFT-1233:
--------------------------------------

If you have a patch for this please attach it

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Jake Farrell
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1233.
--------------------------------


> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: alexandre parenteau
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch, thrift-1233.2.tgz
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (THRIFT-1233) Remove unused include in generated C++ code

Posted by "Jake Farrell (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/THRIFT-1233?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jake Farrell closed THRIFT-1233.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 0.7
         Assignee: Diwaker Gupta  (was: Jake Farrell)

Committed, thanks for the patch.

> Remove unused include in generated C++ code
> -------------------------------------------
>
>                 Key: THRIFT-1233
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1233
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Compiler
>         Environment: Ubuntu 11.04, latest trunk.
>            Reporter: Diwaker Gupta
>            Assignee: Diwaker Gupta
>            Priority: Trivial
>             Fix For: 0.7
>
>         Attachments: THRIFT-1233.patch
>
>
> When using cob_style with the CPP generator, the compiler adds an include for TTransportUtils. This include doesn't seem to be used anywhere and creates an unnecessary dependency. It also complicates compiling Thrift generated code on other platforms.
> Patch available for review here:
> https://reviews.apache.org/r/1034/

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira