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.