You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Paul Ingles (JIRA)" <ji...@apache.org> on 2010/02/05 14:56:27 UTC
[jira] Created: (THRIFT-696) require statements should reference
from current directory
require statements should reference from current directory
----------------------------------------------------------
Key: THRIFT-696
URL: https://issues.apache.org/jira/browse/THRIFT-696
Project: Thrift
Issue Type: Improvement
Components: Compiler (Ruby)
Reporter: Paul Ingles
Currently, require statements just use require 'some_constants' or 'some_types'. When you move the generated code into part of another project that is below the top-level directory the requires are no longer valid.
I've patched the code to instead use the require as:
File.join(File.dirname(__FILE__), 'some_constants'))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-696) require statements should reference
from current directory
Posted by "Paul Ingles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Ingles updated THRIFT-696:
-------------------------------
Attachment: rb_require_from_current_dir.patch
Patch to use require from directory of current file.
> require statements should reference from current directory
> ----------------------------------------------------------
>
> Key: THRIFT-696
> URL: https://issues.apache.org/jira/browse/THRIFT-696
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Reporter: Paul Ingles
> Attachments: rb_require_from_current_dir.patch
>
>
> Currently, require statements just use require 'some_constants' or 'some_types'. When you move the generated code into part of another project that is below the top-level directory the requires are no longer valid.
> I've patched the code to instead use the require as:
> File.join(File.dirname(__FILE__), 'some_constants'))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (THRIFT-696) require statements should reference
from current directory
Posted by "Paul Ingles (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Ingles updated THRIFT-696:
-------------------------------
Priority: Minor (was: Major)
> require statements should reference from current directory
> ----------------------------------------------------------
>
> Key: THRIFT-696
> URL: https://issues.apache.org/jira/browse/THRIFT-696
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Reporter: Paul Ingles
> Priority: Minor
> Attachments: rb_require_from_current_dir.patch
>
>
> Currently, require statements just use require 'some_constants' or 'some_types'. When you move the generated code into part of another project that is below the top-level directory the requires are no longer valid.
> I've patched the code to instead use the require as:
> File.join(File.dirname(__FILE__), 'some_constants'))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (THRIFT-696) require statements should reference
from current directory
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12830218#action_12830218 ]
Bryan Duxbury commented on THRIFT-696:
--------------------------------------
We used to have it work this way, but it lead to difficulties. The advised way to require Thrift generated code in Ruby is to add the directory containing the types to the load path and then require the name of the file without any path.
> require statements should reference from current directory
> ----------------------------------------------------------
>
> Key: THRIFT-696
> URL: https://issues.apache.org/jira/browse/THRIFT-696
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Reporter: Paul Ingles
> Priority: Minor
> Attachments: rb_require_from_current_dir.patch
>
>
> Currently, require statements just use require 'some_constants' or 'some_types'. When you move the generated code into part of another project that is below the top-level directory the requires are no longer valid.
> I've patched the code to instead use the require as:
> File.join(File.dirname(__FILE__), 'some_constants'))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (THRIFT-696) require statements should reference
from current directory
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-696?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury closed THRIFT-696.
--------------------------------
Resolution: Won't Fix
> require statements should reference from current directory
> ----------------------------------------------------------
>
> Key: THRIFT-696
> URL: https://issues.apache.org/jira/browse/THRIFT-696
> Project: Thrift
> Issue Type: Improvement
> Components: Ruby - Compiler
> Reporter: Paul Ingles
> Priority: Minor
> Attachments: rb_require_from_current_dir.patch
>
>
> Currently, require statements just use require 'some_constants' or 'some_types'. When you move the generated code into part of another project that is below the top-level directory the requires are no longer valid.
> I've patched the code to instead use the require as:
> File.join(File.dirname(__FILE__), 'some_constants'))
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.