Saturday, February 19, 2005

Subversion + Ruby + SWIG = Fun!

So thanks to the work of Kouhei Sutou we now have a set of SWIG based Subversion bindings for Ruby. They're currently living on a branch in the Subversion repository, and I've been meaning to get around to trying them out for a while now.

My first attempt resulted in a bit of a failure due to the fact that the version of Ruby I got with my Ubuntu linux install seems to fail to expose the symbol rb_hash_foreach from, so whenever I tried to run the tests I'd get failures due to relocation errors when it tried to use that function.

I have no clue why that symbol isn't being exposed (if anyone does have an idea, please let me know, cause it's a pain in the ass), but once I built my own version of Ruby (to go along with my own version of SWIG since Ubuntu's version of SWIG has bugs that keep it from working for the Subversion Ruby bindings) everything went along swimmingly.

It's quite nice to have a set of reasonably complete Subversion bindings for such a cool language. All they need is a little documentation and I suspect they'll be just as functional as the excellent Perl bindings we've had for some time.