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 <br...@rapleaf.com> on 2009/03/05 07:16:21 UTC
Issue with Ruby generated code and references to other thrift files
We have a bunch of separate .thrift files and a sort of hierarchy of
includes so we can use the types. Up until recently, only the two
main ones were in use in Ruby, and they lived in the same directory,
so we had no problem. However, we've just added another one which
lives in another directory, and now we're running into problems. The
basic issue is that the Ruby generated code assumes that
included .thrift files' generated code will be in exactly the same
directory, which seems really impractical.
In Java, we don't have this problem, because it's assumed that the
user will put the right classes in the classpath. Should we maybe
extend this approach to the Ruby generated code, and just skip
requiring the included files altogether? This would let us put the
included types wherever we want, but puts the onus of managing the
right order of requires to get things done right on the user.
Are there any other ways that we could do this that would be easier
or more reliable?
-Bryan
Re: Issue with Ruby generated code and references to other thrift files
Posted by Bryan Duxbury <br...@rapleaf.com>.
Kevin and I chatted about this offline, and came up with https://
issues.apache.org/jira/browse/THRIFT-358.
-Bryan
On Mar 4, 2009, at 10:16 PM, Bryan Duxbury wrote:
> We have a bunch of separate .thrift files and a sort of hierarchy
> of includes so we can use the types. Up until recently, only the
> two main ones were in use in Ruby, and they lived in the same
> directory, so we had no problem. However, we've just added another
> one which lives in another directory, and now we're running into
> problems. The basic issue is that the Ruby generated code assumes
> that included .thrift files' generated code will be in exactly the
> same directory, which seems really impractical.
>
> In Java, we don't have this problem, because it's assumed that the
> user will put the right classes in the classpath. Should we maybe
> extend this approach to the Ruby generated code, and just skip
> requiring the included files altogether? This would let us put the
> included types wherever we want, but puts the onus of managing the
> right order of requires to get things done right on the user.
>
> Are there any other ways that we could do this that would be easier
> or more reliable?
>
> -Bryan