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

[jira] Created: (THRIFT-358) Change how external thrift files' generated code is required

Change how external thrift files' generated code is required
------------------------------------------------------------

                 Key: THRIFT-358
                 URL: https://issues.apache.org/jira/browse/THRIFT-358
             Project: Thrift
          Issue Type: Improvement
          Components: Compiler (Ruby)
            Reporter: Bryan Duxbury
            Assignee: Bryan Duxbury
             Fix For: 0.1


Currently, Ruby generated structs assume that any external Thrift files' generated code can be found in exactly the same directory, which is often not the case. This leads to issues when you have a bunch of different thrift files and generated code living in different places. 

The best solution seems to be to change the generator to omit the path leading up to the included thrift file's name, and just assuming that the developer will put the external generated code into the Ruby load path.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-358) Change how external thrift files' generated code is required

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

Bryan Duxbury updated THRIFT-358:
---------------------------------

    Attachment: thrift-358.patch

This should do it. There isn't any test for this in the current codebase, but I verified that it works in my projects.

> Change how external thrift files' generated code is required
> ------------------------------------------------------------
>
>                 Key: THRIFT-358
>                 URL: https://issues.apache.org/jira/browse/THRIFT-358
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>             Fix For: 0.1
>
>         Attachments: thrift-358.patch
>
>
> Currently, Ruby generated structs assume that any external Thrift files' generated code can be found in exactly the same directory, which is often not the case. This leads to issues when you have a bunch of different thrift files and generated code living in different places. 
> The best solution seems to be to change the generator to omit the path leading up to the included thrift file's name, and just assuming that the developer will put the external generated code into the Ruby load path.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (THRIFT-358) Change how external thrift files' generated code is required

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

Bryan Duxbury updated THRIFT-358:
---------------------------------

    Patch Info: [Patch Available]

> Change how external thrift files' generated code is required
> ------------------------------------------------------------
>
>                 Key: THRIFT-358
>                 URL: https://issues.apache.org/jira/browse/THRIFT-358
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>             Fix For: 0.1
>
>         Attachments: thrift-358.patch
>
>
> Currently, Ruby generated structs assume that any external Thrift files' generated code can be found in exactly the same directory, which is often not the case. This leads to issues when you have a bunch of different thrift files and generated code living in different places. 
> The best solution seems to be to change the generator to omit the path leading up to the included thrift file's name, and just assuming that the developer will put the external generated code into the Ruby load path.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-358) Change how external thrift files' generated code is required

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

Kevin Clark commented on THRIFT-358:
------------------------------------

Simple enough. +1 to the patch

> Change how external thrift files' generated code is required
> ------------------------------------------------------------
>
>                 Key: THRIFT-358
>                 URL: https://issues.apache.org/jira/browse/THRIFT-358
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>             Fix For: 0.1
>
>         Attachments: thrift-358.patch
>
>
> Currently, Ruby generated structs assume that any external Thrift files' generated code can be found in exactly the same directory, which is often not the case. This leads to issues when you have a bunch of different thrift files and generated code living in different places. 
> The best solution seems to be to change the generator to omit the path leading up to the included thrift file's name, and just assuming that the developer will put the external generated code into the Ruby load path.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (THRIFT-358) Change how external thrift files' generated code is required

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

Bryan Duxbury resolved THRIFT-358.
----------------------------------

    Resolution: Fixed

Committed.

> Change how external thrift files' generated code is required
> ------------------------------------------------------------
>
>                 Key: THRIFT-358
>                 URL: https://issues.apache.org/jira/browse/THRIFT-358
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>             Fix For: 0.1
>
>         Attachments: thrift-358.patch
>
>
> Currently, Ruby generated structs assume that any external Thrift files' generated code can be found in exactly the same directory, which is often not the case. This leads to issues when you have a bunch of different thrift files and generated code living in different places. 
> The best solution seems to be to change the generator to omit the path leading up to the included thrift file's name, and just assuming that the developer will put the external generated code into the Ruby load path.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (THRIFT-358) Change how external thrift files' generated code is required

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

Kevin Clark commented on THRIFT-358:
------------------------------------

+1

Hardcoding the path feels wrong. This is better.

> Change how external thrift files' generated code is required
> ------------------------------------------------------------
>
>                 Key: THRIFT-358
>                 URL: https://issues.apache.org/jira/browse/THRIFT-358
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Compiler (Ruby)
>            Reporter: Bryan Duxbury
>            Assignee: Bryan Duxbury
>             Fix For: 0.1
>
>
> Currently, Ruby generated structs assume that any external Thrift files' generated code can be found in exactly the same directory, which is often not the case. This leads to issues when you have a bunch of different thrift files and generated code living in different places. 
> The best solution seems to be to change the generator to omit the path leading up to the included thrift file's name, and just assuming that the developer will put the external generated code into the Ruby load path.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.