github / version_sorter

Fast sorting of version numbers
MIT License
125 stars 42 forks source link

C code from master doesn't pass CI #6

Closed mislav closed 9 years ago

mislav commented 9 years ago

Hi @vmg I will need your help here please.

On "enable-travis" branch I've tried enabling Travis CI but it fails with errors:

  1. Rubies 1.8–2.0 fail with "undefined symbol RARRAY_AREF";
  2. Rubies 2.1–2.2 fail with segfaults.

All tests pass for me on these Ruby versions on Darwin except 1.8 which fails with:

Edyld: lazy symbol binding failed: Symbol not found: _RARRAY_AREF
  Referenced from: /Users/mislav/github/version_sorter/lib/version_sorter.bundle
  Expected in: flat namespace

dyld: Symbol not found: _RARRAY_AREF
  Referenced from: /Users/mislav/github/version_sorter/lib/version_sorter.bundle
  Expected in: flat namespace

I'm not adamant about 1.8 support but since it worked in the 1.1.1 version of this library I'm trying to see whether we can keep compatibility or official drop it.

And as for other Ruby versions, do you have an idea what's going on here?

mislav commented 9 years ago

The old code (before our rewrite) passes CI on all Ruby versions.

tmm1 commented 9 years ago

You'll need to add:

#ifndef RARRAY_AREF
#define RARRAY_AREF(ary, i) (RARRAY_PTR(ary)[i])
#endif

Not sure about the segfaults.

vmg commented 9 years ago

I'll make this compatible first thing tomorrow morning. Sorry for the fuss!

mislav commented 9 years ago

@tmm1 Thanks, but that just makes working OS X code segfault now. Not sure what's amiss here.

@vmg I appreciate that. We all should have rights to push to this project right now so just base your edits on "enable-travis" branch and it will get verified by Travis CI across rubies.

Don't worry about 1.8 compatiblity if it's a pain; we can always drop it since this is going to be a major release. I'm pretty sure I'm already using some 1.9-isms in test suite anyway.

vmg commented 9 years ago

Fixed :))

mislav commented 9 years ago

Thanks! :heart_decoration: