Thrift Lib package
anthonym at alumni.caltech.edu
Tue Feb 21 23:44:10 EST 2012
On Tue, Feb 21, 2012 at 06:11:15PM -0800, Geoff Cant wrote:
> Hi there, I had a lot of trouble on a previous project that required thrift from Erlang. One of the things we ended up doing to make our lives easier was to extract the erlang Thrift library from the main thrift distribution and maintain it independently. We cleaned up a lot of compile and dialyzer warnings this way and were able to host the resulting library as a stand-alone git repo which made rebar integration as easy as it should have been in the first place.
I don't remember seeing any tickets related to this, did you happen to submit
any of this upstream?
> The thrift project has seldom shipped worthwhile or necessary updates to the Erlang bindings in my experience, so the effort of maintaining it as a fork was minimal. Unfortunately I no longer have access to the fork we came up with, but it's not too difficult to do yourself.
Well, with the last few versions I've merged in a reconnecting gen_server
which Joel wrote, as well as a JSON transport patch, as well as updating
the build system to use rebar. So while you might not consider them
worthwhile or necessary, some people found them worthwhile and necessary
enough to submit them.
I would like to make the thrift library more embeddable, without forking
it as that is not the wishes of the maintainers which are working toward
cross language unit tests and the like.
If there is anything that can be done to support this embeddability which
would still work within the larger rebar and thrift communities.
Right now, if you do the following
% svn checkout \
% cd thrift
% perl -pe 's/\@PACKAGE_NAME\@/thrift/g; s/\@PACKAGE_VERSION\@/0.8.0/g;' \
src/thrift.app.src.in > src/thrift.app.src
% ./rebar get-deps
% ./rebar compile
Everything works (with a few errors which I thought I had corrected, already
So right now it's almost embeddable. As the PACKAGE_NAME can probably be
hardcoded as thrift, that leaves the version. So I guess the question would
be is there some way to get the version to the right place at the right time?
Anthony Molinaro <anthonym at alumni.caltech.edu>
More information about the rebar