Gems

I’m having second thoughts about the Shoes 3 gems. So far, Shoes 3.2 doesn’t include Sqlite, hpricot, and json. Mostly because they are woefully out of date and depend on native libraries that most users don’t have so they too would have to be built and distributed with Shoes. Picking any version to include with Shoes 3.2 is just continuing the out-of-date problem. Shoes 3.2 has ways for experienced Ruby folk to get them installed.

On the other hand, it’s not Shoes for newbies without them (even if nobody uses them). Let’s review them.

  • Json – there a version that comes with Ruby 2.1.x. Is it api compatible?
  • Hpricot – There’s a slightly newer version but I don’t think it’s actively maintained. For Shoes 3.2 that’s probably a good thing -it won’t change. Cross compiling it for Windows might be a problem. Who knows what silliness might be required on OSX or which missing system libs are needed. I was doable before, it might not be that hard. I’ll talk about Nokogiri later.
  • Sqlite3 – A moving target but probably the easiest to accomodate. They distribute a dll so I don’t have to cross compile it for Windows. I would need to cross compile the sqlite3 gem

The real problem is the ext’s and the damn extconf.rb rakefiles and Ruby reluctance to be cross compiled. The way it work’s now for ext’s is lame. Adding 3 or 4 more would be painful. It might help some future mainainer if I make it less lame. It’s also silly to rebuild all of Shoes just to test a change in a gem or ext extconf.rb. They’re dynamically loaded – you don’t have to recompile everything for that. Nor should I have to recompile all gems because I add a # to shoes.rb

I haven’t worked the details yet but the overarching idea is they are gems and not part of Shoes. Separate build process. Perhaps they could be gems at a special Shoes gem repository. I don’t know.
Maybe a rake task ‘gems:sqlite3’ … that knows about the cross compile. Maybe not.

Leave a Reply

Your email address will not be published. Required fields are marked *