Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
brixen opened this issue Nov 12, 2012 · 60 comments
Closed

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

brixen opened this issue Nov 12, 2012 · 60 comments

Comments

@brixen
Copy link
Member

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.

@jc00ke
Copy link
Member

jc00ke commented Nov 12, 2012

I'll work on this this morning.

@kungfumike
Copy link

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

@brixen
Copy link
Member Author

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...

@jc00ke
Copy link
Member

jc00ke commented Nov 12, 2012

JSON passes in 1.8 and 1.9 modes on Travis.

@jc00ke
Copy link
Member

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
Copy link

mrb commented Nov 12, 2012

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

@kungfumike
Copy link

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
Copy link
Member

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 😕

@razielgn
Copy link
Contributor

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
Copy link

mrb commented Nov 13, 2012

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

@guilleiguaran
Copy link
Member

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

@dbussink
Copy link
Contributor

For the sqlite3-ruby 1.9 mode tests: f75cda9

@jc00ke
Copy link
Member

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.

@kungfumike
Copy link

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)

@kungfumike
Copy link

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

@jc00ke
Copy link
Member

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

@brixen
Copy link
Member Author

brixen commented Nov 14, 2012

@kungfumike test everything against master HEAD.

@jc00ke
Copy link
Member

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
Copy link
Contributor

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"

@dbussink
Copy link
Contributor

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

@mhoran
Copy link

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
Copy link

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.

@jc00ke
Copy link
Member

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.

@sodabrew
Copy link
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.

@warrenseen
Copy link
Contributor

@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
Copy link

mhoran commented Feb 27, 2013

@warrenseen, any update on StringIO and copy_stream?

@warrenseen
Copy link
Contributor

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.

@stouset
Copy link
Contributor

stouset commented Mar 29, 2013

@warrenseen Did you ever have time to rebase?

@warrenseen
Copy link
Contributor

@stouset see #2246

@dbussink
Copy link
Contributor

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

@jc00ke
Copy link
Member

jc00ke commented Apr 12, 2013

@dbussink thanks, updated.

@hron84
Copy link

hron84 commented Apr 12, 2013

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

@dbussink
Copy link
Contributor

@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
Copy link

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...

@edmundhighcock
Copy link

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!

@jc00ke
Copy link
Member

jc00ke commented Jun 22, 2015

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

@yorickpeterse
Copy link
Contributor

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

@jc00ke
Copy link
Member

jc00ke commented Jun 22, 2015

Thx @yorickpeterse

@edmundhighcock
Copy link

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

@brixen brixen added the mysql2 label Jun 7, 2016
@brixen brixen removed the mysql2 label Jan 4, 2020
@brixen
Copy link
Member Author

brixen commented Jan 4, 2020

Rubinius encourages people to experiment with existing Ruby projects, but migrating from MRI is not an activity that has been very successful in the past.

The focus for Rubinius in the near term is on the following capabilities:

  1. Instruction set
  2. Debugger
  3. Profiler
  4. Just-in-time compiler
  5. Concurrency
  6. Garbage collector

Contributions in the form of PRs for any of the areas of focus above are appreciated. Once those core capabilities are more robust, it will be possible to better support people interested in trying to run their existing projects on Rubinius.

@brixen brixen closed this as completed Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests