Ensure the tests for these C-exts pass on Rubinius #2006

Open
brixen opened this Issue Nov 12, 2012 · 59 comments

Comments

Projects
None yet
Owner

brixen commented Nov 12, 2012

Here is a list of popular C-ext gems. Ensure the tests for each pass on Rubinius in 1.x and 2.x branches.

Needs help

1.x (Ruby 1.8.7) 2.x (Ruby 2.x) Tested?
JSON Travis (o)
therubyracer Travis (o)
fast-xs Travis (o)
sqlite3-ruby Travis (o)
zookeeper Travis (o)
capybara-webkit x[3] Travis (o)
EventMachine Travis (o)
Unicorn - - Local [1]
raindrops ? ? ?
rainbows ? ? ?
kgio ? ? ?
thin[5] ? ? Travis (o)
mysql2 + + Local
pg + + Local
RedCarpet Travis (o)
nokogiri Travis (o)
yajl-ruby Travis (o)
rugged Travis (o)
sys-proctable Travis (u)
bcrypt-ruby Travis (o)
hpricot Travis (o)
rb-gsl Travis (o)

Note: Travis (o) means the owner of the repo is testing on Travis (official) and Travis (u) means it's unofficial (one of us set it up)
[1] @kungfumike's findings
[2] vmg/redcarpet#172
[3] They don't test 1.8.x so we won't either.
[4] Locally I get an undefined method 'spawn' on Kernel https://gist.github.com/4145191
[5] rbx has been added to the .travis.yml but the tests aren't running on Travis. Some issue w/Travis.

We can add to this list as well.

Some of these may already pass, but we should verify them all.

Owner

jc00ke commented Nov 12, 2012

I'll work on this this morning.

To be explicit, since I haven't helped before:

  1. git-clone each of the projects listed above on their current "release" branch(or svn, or whatever)
  2. Using Rubinius with each of the x18 and x19 flags do:
    2a) Bundle install
    2b) Run the respective test suite for that gem (rspec, test unit, whatever is documented by that project)

Am I understanding correctly? Assuming I am I will start at the bottom of this list assuming jc00ke is starting from the top

Owner

brixen commented Nov 12, 2012

@jc00ke sweet, thanks!

@kungfumike that sounds good. A couple notes, use RBXOPT=-X18 or -X19 in case tests subprocess. And you can use rbx -G -S rake to load the Gemfile before running rake, it's a shortcut for bundle exec which would require rbx -S bundle exec rbx -S rake...

Owner

jc00ke commented Nov 12, 2012

JSON passes in 1.8 and 1.9 modes on Travis.

Owner

jc00ke commented Nov 12, 2012

Nokogiri passes in 1.8 mode on Travis.

I'm having some problems updating my rbx to latest. Once I get that sorted out I'll test in 1.9 mode & report.

UPDATE Fails in 1.9 mode: https://gist.github.com/4061584

mrb commented Nov 12, 2012

@brixen I'd add pg to this list as well. Postgres is very popular these days.

I just sent this to the Unicorn mailing list, but if one of you knows of an obvious and good resource, I am open to whatever help I can get to get ramped up on this:

Hello,

My name is Mike and I helping Brain (@brixen) with Rubinius testing (or at least trying very valiantly). At them moment I am having trouble getting my environment set up in such a way, as to run the:

make -j4 test

command. I am having issues resolving my environment and load paths against what the unicorn project is looking for. I was curious if there were any examples of environments or setups for testing Unicorn. I have read the README files located in the project, and attempted setting my "RUBYLIB" variable in the local.mk . If someone could get me started/pointed in the right direction, I would really like to help out with Rubinius, and maybe even Unicorn in the future. Here is a gist of my output:

https://gist.github.com/4062317

System is a Debian Wheezy X86_64 uname -a string:
Linux sm-mike-thinkpad 3.2.0-3-amd64 #1 SMP Mon Jul 23 02:45:17 UTC 2012 x86_64 GNU/Linux

Thank you very much for any and all efforts to get me going,

@jc00ke jc00ke added a commit to jc00ke/sys-proctable that referenced this issue Nov 12, 2012

@jc00ke jc00ke Add .travis.yml
In support of rubinius/rubinius#2006 let's get this working on Travis.
ea05088

@jc00ke jc00ke added a commit to jc00ke/sqlite3-ruby that referenced this issue Nov 12, 2012

@jc00ke jc00ke Allow rbx 1.8 & 1.9 modes to fail on Travis
In support of rubinius/rubinius#2006 we're trying to get important
gems with C-extensions to test on Rubinius.

Thanks for your consideration!
a0fcca2

jc00ke referenced this issue in sparklemotion/sqlite3-ruby Nov 12, 2012

Merged

Allow rbx 1.8 & 1.9 modes to fail on Travis #76

@jc00ke jc00ke added a commit to jc00ke/mysql2 that referenced this issue Nov 12, 2012

@jc00ke jc00ke Allow rbx 1.8 & 1.9 modes to fail on Travis
In support of rubinius/rubinius#2006 we're trying to get important 
gems with C-extensions to test on Rubinius.

Thanks for your consideration!
9a1e220
Owner

jc00ke commented Nov 13, 2012

@mrb have you been able to run the pg specs? I get a LoadError on hoe in MRI 1.9.3 but not in 1.8.7.

If I just use 1.8.7 then I get an error that command 'initdb' failed 😕

Contributor

razielgn commented Nov 13, 2012

Set up travis on eventmachine (https://travis-ci.org/razielgn/eventmachine)
In both modes it hangs indefinitely, until the job is killed.

This is the code that causes the hang:

  def test_fork_safe
    return unless cpid = fork { exit! } rescue false

    read, write = IO.pipe
    EM.run do
      cpid = fork do
        write.puts "forked"
        EM.run do                                                                                                        
          EM.next_tick do
            write.puts "EM ran"
            exit!
          end 
        end 
      end 
      EM.stop
    end 
    Process.waitall
    assert_equal "forked\n", read.readline
    assert_equal "EM ran\n", read.readline
  ensure
    read.close rescue nil 
    write.close rescue nil
  end

mrb commented Nov 13, 2012

@jc00ke It's been a while since I've tried, but yeah, last time was a total nightmare :(

Member

guilleiguaran commented Nov 13, 2012

Tested also with EM locally, as @razielgn says it hangs indefinitely in 1.8 and 1.9 mode

Owner

dbussink commented Nov 13, 2012

For the sqlite3-ruby 1.9 mode tests: f75cda9

Owner

jc00ke commented Nov 13, 2012

Almost got pg up on Travis. The specs use initdb, which I can't seem to find. Oh well, specs pass locally.

Still working on Unicorn, 1.8.7 right now:

https://gist.github.com/4070179

Should I be using master head instead of the 2.0rc1 ?
@jc00ke Should I be investigating this "Travis" thing? (I hope you can forgive me that I have never heard of it)

And with RBXOPT -X19 it appears to hang indefinitely.

https://gist.github.com/4070223

@brixen Should I be testing this against 2.0rc1 or head? or just anything to make it pass?

Going to make Unicorn as a fail for now unless I am missing something

Owner

jc00ke commented Nov 14, 2012

@kungfumike nah, don't worry about Travis. Thanks for investigating unicorn, I'll add your findings to the table above.
I've been using HEAD

Owner

brixen commented Nov 14, 2012

@kungfumike test everything against master HEAD.

Owner

jc00ke commented Nov 14, 2012

My PRs to thin (macournoyer/thin#147 and macournoyer/thin#148) have been accepted, just waiting on Travis to pick thin up to be tested.

razielgn referenced this issue in eventmachine/eventmachine Nov 14, 2012

Merged

Travis-CI support and a slight change to the rake task #381

Contributor

razielgn commented Nov 14, 2012

I think another worthy native gem to test is https://github.com/mongodb/mongo-ruby-driver, both 18 and 19 mode yield the same error on Time#zone: https://gist.github.com/4072543.
But it doesn't seem to be related to the gem as ObjectId#generation_time returns a Time object:

# rbx-head
BSON::ObjectId.new.generation_time.zone # => "GMT"

# mri-1.9.3-p286
BSON::ObjectId.new.generation_time.zone # => "UTC"

arjen referenced this issue in libgit2/rugged Nov 14, 2012

Merged

Allow rbx 1.9 mode to fail on Travis #120

Owner

dbussink commented Nov 14, 2012

@razielgn If you could extract that Time issue further that would be great!

Owner

jc00ke commented Nov 14, 2012

@razielgn Looks like the TZ issue is not related to the C-ext: https://gist.github.com/4073864

Unicorn - Confirmed the exact same results against head that I did against 2.0rc1. Will start diving into the 1.8 version to see if I can isolate and produce a bug.

wjessop commented Nov 14, 2012

These are the native gems that get installed when I bundle our app (minus the ones already in the list). I've added the travis projects where I could find them:

RedCloth
bcrypt-ruby - https://travis-ci.org/wenzowski/bcrypt-ruby
ffi
hpricot - https://travis-ci.org/hpricot/hpricot
rmagick
yajl-ruby - https://travis-ci.org/brianmario/yajl-ruby

Contributor

razielgn commented Nov 14, 2012

bcrypt-ruby runs fine both in 18 and 19 mode. Tried today, but didn't record the results in a gist since everything turned out to be good.

Contributor

Gibheer commented Nov 14, 2012

As @wjessop mentioned RedCloth, I went and tested RedCarpet. It works on 1.8 and 1.9 mode and I made a pull request for current travis modes.

arjen commented Nov 16, 2012

To be added to the list:
libgit2/rugged (branch: development) runs on Travis. Works in 1.8, fails in 1.9 mode:
https://travis-ci.org/libgit2/rugged/builds/3207634

jc00ke referenced this issue in hpricot/hpricot Nov 16, 2012

Merged

Allow rbx to fail in 1.8/1.9 modes on Travis #67

Contributor

sodabrew commented Nov 17, 2012

Please come help with mysql2 test failures on Rubinius. It fails in rbx-18mode due to a Timeout block raising a SystemStackError, and in rbx-19mode due to tests that alter Encoding.default_internal (which the Ruby docs say not to do, but...)

brianmario/mysql2#334

Owner

dbussink commented Nov 17, 2012

@sodabrew With the pull request sent to mysql2, the specs pass here locally. When Travis upgrades to latest Rubinius, they will be fixed on Travis too.

@slyphon slyphon added a commit to zk-ruby/zookeeper that referenced this issue Nov 17, 2012

@jc00ke @slyphon jc00ke + slyphon Add rbx 1.8 & 1.9 to CI
In support of rubinius/rubinius#2006 it'd be great to test
zookeeper on Rubinius. Allowing rbx to fail is a good place
to start.

If they happen to pass, I'll submit another PR to remove the
allowed failures.

Thanks for your consideration.
6ddc4d5

It looks like rugged passes now in 1.9 mode:

https://travis-ci.org/libgit2/rugged/jobs/3257991

@brixen can you update the table?

Owner

jc00ke commented Nov 19, 2012

@calavera updated 😉

Note: I've been maintaining the table, so if anyone needs it updated mention me.

jc00ke referenced this issue in thoughtbot/capybara-webkit Nov 19, 2012

Closed

Allow rbx to fail in 1.9 mode #418

arjen commented Nov 19, 2012

@jc00ke, @calavera, that rugged build is MRI 1.9.
Rubinius still fails: https://travis-ci.org/libgit2/rugged/jobs/3257993

Owner

jc00ke commented Nov 19, 2012

@arjen thanks!

oh, right. Sorry about the noise, for some reason I saw everything green
yesterday.

On Mon, Nov 19, 2012 at 9:26 AM, Jesse Cooke notifications@github.comwrote:

@arjen https://github.com/arjen thanks!


Reply to this email directly or view it on GitHubhttps://github.com/rubinius/rubinius/issues/2006#issuecomment-10522474.

Contributor

warrenseen commented Nov 19, 2012

I've identified the problem getting capybara-webkit specs to run. I should have a pull request ready in the next 24 hours to address this issue.

Owner

jc00ke commented Nov 20, 2012

@warrenseen sweet, keep us posted!

Contributor

warrenseen commented Nov 20, 2012

@jc00ke, with #2040 applied, I'm seeing capybara-webkit specs now running. Their specs do not appear to run against MRI 1.8.7, so I'm running them with -X19 set and seeing a single failure currently.

warrenseen referenced this issue in thoughtbot/capybara-webkit Nov 20, 2012

Closed

Use MatchArray to compare event arrays. #420

Contributor

warrenseen commented Nov 20, 2012

@jc00ke pull request into capybara-webkit, that should get us a green build on rbx in 1.9 mode at least.

mhoran commented Nov 23, 2012

I've got capybara-webkit master working, however my Capybara 2.0 branch is failing. It looks like IO.popen with stderr forwarding doesn't work with Rubinius.

Contributor

warrenseen commented Nov 23, 2012

@mhoran I'm happy to look into that at some stage, if no one else gets to it first.

mhoran commented Nov 23, 2012

Replacing IO.popen with Open3.popen2e seems to have done it. capybara-webkit on Rubinius 1.9 is looking good. Note that Capybara has dropped 1.8 support, so we don't support it either.

mhoran commented Nov 26, 2012

capybara-webkit is failing on Rubinius again. It seems that IO#copy_stream doesn't work. See https://travis-ci.org/mhoran/capybara-webkit/jobs/3358639.

arjen commented Nov 27, 2012

Regarding note 5:
Does thin even have the travis service hook set up?
I see no builds at all in the history.

Owner

jc00ke commented Nov 27, 2012

@arjen The hook is set up. There was an issue with Travis, which has been sorted out. Once @macournoyer pushes again we should see it trigger.

Contributor

sodabrew commented Dec 3, 2012

Any ETA on updating Travis to rbx 2.0.0rc1 or newer? In the meantime, I've reverted the travis config for mysql2 to allow rbx failures, since it's failing.

Contributor

warrenseen commented Jan 6, 2013

@mhoran I've fixed the copy_stream issue in: #2114 - once this is merged, the build will work again, and I have a further patch to StringIO that solves failures relating to copy_stream when used with StringIO.

mhoran commented Feb 27, 2013

@warrenseen, any update on StringIO and copy_stream?

Contributor

warrenseen commented Feb 27, 2013

I need to do some rebasing and get the PR in, will work on it over the next few days.

On 28/02/2013, at 4:06 AM, Matthew Horan notifications@github.com wrote:

@warrenseen, any update on StringIO and copy_stream?


Reply to this email directly or view it on GitHub.

Contributor

stouset commented Mar 29, 2013

@warrenseen Did you ever have time to rebase?

Contributor

warrenseen commented Mar 29, 2013

Owner

dbussink commented Apr 12, 2013

Just verified that mysql2 and pg are both working in 1.8 and 1.9 mode here locally.

Owner

jc00ke commented Apr 12, 2013

@dbussink thanks, updated.

hron84 commented Apr 12, 2013

Can -X20 cause any difference to -X19 in binary compatibility? I'm just curious...

Owner

dbussink commented Apr 12, 2013

@hron84 Not yet. But if there are additions to the C-API that need to be 2.0 only, we probably have to split that off like 1.8 and 1.9 atm.

hron84 commented Apr 12, 2013

I just interested in that because I'd like to try out some 2.0 features (%i for example) in app what uses some common gems (sinatra, thin, sqlite3, etc), nothing special...

jc00ke referenced this issue in savonrb/savon May 20, 2015

Merged

Add Rubinius back to CI #686

Could we add rb-gsl to the table?

https://rubygems.org/gems/rb-gsl/versions/1.16.0.4

It is very useful for ppl in the scientific community who want to leverage the multi-threadness and other great features of Rubinius. I've posted an issue on their github page as well,

blackwinter/rb-gsl#28

and I don't think it should be a massive amount of work, but it would probably be much quicker for a rubinius dev than an rb-gsl dev. I'm going to have a look at it, but as I am neither a rubinius dev nor an rb-gsl dev I think it will take me quite a while!

edmundhighcock referenced this issue in blackwinter/rb-gsl Jun 22, 2015

Open

Rubinius support #28

Owner

jc00ke commented Jun 22, 2015

@edmundhighcock once blackwinter/rb-gsl#29 is merged I can add it to the table.

Owner

YorickPeterse commented Jun 22, 2015

Updated the table so it now lists rbx-1 vs rbx-2 as the -X based mode options were removed quite a while ago.

Owner

jc00ke commented Jun 22, 2015

Hi all, thanks for getting on to this so quickly... awesome!

brixen added the mysql2 label Jun 7, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment