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/05/13 20:51:45 UTC
[jira] Created: (THRIFT-501) File.dirname(...) requires cause
warnings in some scenarios
File.dirname(...) requires cause warnings in some scenarios
-----------------------------------------------------------
Key: THRIFT-501
URL: https://issues.apache.org/jira/browse/THRIFT-501
Project: Thrift
Issue Type: Improvement
Components: Compiler (Ruby)
Affects Versions: 0.1
Reporter: Bryan Duxbury
Assignee: Bryan Duxbury
Priority: Trivial
Fix For: 0.2
We use a bunch of thrift files, some including others. The ones that have _constants.rb files require the related _types.rb file using "File.dirname(__FILE__) + '/whatever_types.rb'", which is designed to help the constants file find the types file. However, since none of the other requires in the project use File.dirname to qualify the requires, we end up reloading some files more than once. This results in us reloading those constants, which in turn generates a whole big bunch of Ruby warnings (in our case over 100).
Since the designated way to require thrift types is to put all the generated files in the load path and then load the files by name, I think that we should remove the File.dirname stuff and rely fully on the 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-501) File.dirname(...) requires cause
warnings in some scenarios
Posted by "Michael Stockton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12711259#action_12711259 ]
Michael Stockton commented on THRIFT-501:
-----------------------------------------
+1
> File.dirname(...) requires cause warnings in some scenarios
> -----------------------------------------------------------
>
> Key: THRIFT-501
> URL: https://issues.apache.org/jira/browse/THRIFT-501
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.1
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Trivial
> Fix For: 0.2
>
> Attachments: thrift-501.patch
>
>
> We use a bunch of thrift files, some including others. The ones that have _constants.rb files require the related _types.rb file using "File.dirname(__FILE__) + '/whatever_types.rb'", which is designed to help the constants file find the types file. However, since none of the other requires in the project use File.dirname to qualify the requires, we end up reloading some files more than once. This results in us reloading those constants, which in turn generates a whole big bunch of Ruby warnings (in our case over 100).
> Since the designated way to require thrift types is to put all the generated files in the load path and then load the files by name, I think that we should remove the File.dirname stuff and rely fully on the 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-501) File.dirname(...) requires cause
warnings in some scenarios
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-501:
---------------------------------
Attachment: thrift-501.patch
This removes the File.dirname portion of the few requires that used it.
> File.dirname(...) requires cause warnings in some scenarios
> -----------------------------------------------------------
>
> Key: THRIFT-501
> URL: https://issues.apache.org/jira/browse/THRIFT-501
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.1
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Trivial
> Fix For: 0.2
>
> Attachments: thrift-501.patch
>
>
> We use a bunch of thrift files, some including others. The ones that have _constants.rb files require the related _types.rb file using "File.dirname(__FILE__) + '/whatever_types.rb'", which is designed to help the constants file find the types file. However, since none of the other requires in the project use File.dirname to qualify the requires, we end up reloading some files more than once. This results in us reloading those constants, which in turn generates a whole big bunch of Ruby warnings (in our case over 100).
> Since the designated way to require thrift types is to put all the generated files in the load path and then load the files by name, I think that we should remove the File.dirname stuff and rely fully on the 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-501) File.dirname(...) requires cause
warnings in some scenarios
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury updated THRIFT-501:
---------------------------------
Patch Info: [Patch Available]
Any rubyists want to review this patch? It's minor, so if I don't get any feedback I'll just commit it in a day or so.
> File.dirname(...) requires cause warnings in some scenarios
> -----------------------------------------------------------
>
> Key: THRIFT-501
> URL: https://issues.apache.org/jira/browse/THRIFT-501
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.1
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Trivial
> Fix For: 0.2
>
> Attachments: thrift-501.patch
>
>
> We use a bunch of thrift files, some including others. The ones that have _constants.rb files require the related _types.rb file using "File.dirname(__FILE__) + '/whatever_types.rb'", which is designed to help the constants file find the types file. However, since none of the other requires in the project use File.dirname to qualify the requires, we end up reloading some files more than once. This results in us reloading those constants, which in turn generates a whole big bunch of Ruby warnings (in our case over 100).
> Since the designated way to require thrift types is to put all the generated files in the load path and then load the files by name, I think that we should remove the File.dirname stuff and rely fully on the 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-501) File.dirname(...) requires cause
warnings in some scenarios
Posted by "Bryan Duxbury (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/THRIFT-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bryan Duxbury resolved THRIFT-501.
----------------------------------
Resolution: Fixed
Committed.
> File.dirname(...) requires cause warnings in some scenarios
> -----------------------------------------------------------
>
> Key: THRIFT-501
> URL: https://issues.apache.org/jira/browse/THRIFT-501
> Project: Thrift
> Issue Type: Improvement
> Components: Compiler (Ruby)
> Affects Versions: 0.1
> Reporter: Bryan Duxbury
> Assignee: Bryan Duxbury
> Priority: Trivial
> Fix For: 0.2
>
> Attachments: thrift-501.patch
>
>
> We use a bunch of thrift files, some including others. The ones that have _constants.rb files require the related _types.rb file using "File.dirname(__FILE__) + '/whatever_types.rb'", which is designed to help the constants file find the types file. However, since none of the other requires in the project use File.dirname to qualify the requires, we end up reloading some files more than once. This results in us reloading those constants, which in turn generates a whole big bunch of Ruby warnings (in our case over 100).
> Since the designated way to require thrift types is to put all the generated files in the load path and then load the files by name, I think that we should remove the File.dirname stuff and rely fully on the load path.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.