Skip to content
This repository has been archived by the owner on Sep 14, 2018. It is now read-only.

Contributing

nrk edited this page Sep 13, 2010 · 69 revisions

In order to contribute to IronRuby, you’ll need to sign the IronRuby assignment agreement. We ask all contributors to sign this agreement to ensure that a non-exclusive copyright assignment is made to Microsoft so that we can redistribute your contribution.

  1. Send an email to ssiadmin and request to be added as a contributor to the IronRuby project.
  2. The actual signature process is handled through an online electronic signature tool.
  3. Once you’ve signed the agreement we’ll be able to review your code for inclusion in IronRuby.

Parts of the codebase are contributions accepted in

Today we are accepting contributions into the libraries only. This is the IronRuby.Libraries.dll assembly whose sources are in the Merlin\Main\Languages\Ruby\Libraries.LCA_RESTRICTED folder. In the future we will open up contributions to the compiler as well (IronRuby.dll) when we have stabilized the DLR APIs.

Note that a repo called IronRuby-contrib has been set up for community projects that build on top of IronRuby. There is opportunity to contribute in these projects too.

Contributing a patch

The steps to contribute a change are:

  • Fork the IronRuby repository as mentioned at Getting the sources
  • Make your changes on you machine, ensure irtests.bat runs successfully, and commit your changes.
  • If your change uses multiple commits, and the commits are not consecutive (because you pulled new updates from the main ironruby repo), use “git rebase” to make the commits consecutive so that a single “git diff” command can be used to review all the changes together.
  • Push the commits to your fork. This way your name will be the author of the commit in the main IronRuby tree (once they commits are pulled into the main tree).
  • Send an email requesting a code reivew to ironruby-core with a brief description of your commit, a link to the commit website, and also a “git diff” command that can be used to see all the changes you have made.
  • Once you get a reply to the email, send a pull request from your github.com fork website.

If you must submit a patch, For details on how to contribute a patch, check out this post by Scott Hanselman. It’s written for SourceForge and DasBlog, but the same thing applies to RubyForge and IronRuby.

Ideas for contributions

Here are some suggestions for areas you can contribute in.

Fixing RubySpec bugs

Fixing bugs in the specs is a good place to start if you are interested in working on the IronRuby sources. Some of the important specs are:

  1. mspec core/string
  2. mspec core/file
  3. mspec core/array

Here are the instructions for fixing a typical bug in RubySpec, say in core/string/split_spec.rb

REM - Make sure the existing tags are correct
mspec ci core/string/split
REM - Make sure that the RubySpecs are correct by running all the specs (do not use "ci") with MRI
mspec -tr core/string/split
REM - Delete the tag file
del Merlin\External\Languages\IronRuby\mspec\ironruby-tags\core\string\split_tags.txt
REM - Now make sure the specs fail with IronRuby
mspec ci core/string/split
REM - Now fix the IronRuby sources. See http://wiki.github.com/ironruby/ironruby/modifying-the-sources
REM - Run the specs again to see if you have fixed the problem
mspec ci core/string/split
REM - Run all the tests to make sure that nothing else got broken
irtests

Implementing missing libraries

We need implementations for the following libraries:

  1. OpenSSL – mspec library/opensll should pass without any failures or errors

App-compatability testing

You can try various Ruby libraries and applications with IronRuby.

  • Document the steps to use it with IronRuby, how well it works (or does not), links to IronRuby bugs, etc. at the IronRuby website
  • Run the unit tests and functionality tests
  • For the bugs found, you could:
    • Fix the IronRuby bugs and send a GIT pull request to the IronRuby mailing list
    • Alternatively, if you do not want to debug and modify the IronRuby sources, you could create a simple stand-alone Ruby repro of the problem and open a bug.
    • Also, some of the failures may be because the app relies on some implementation detail (eg, the order of keys in a Hash is undefined). In such cases, you can submit a patch to the Ruby app to make it work with diferent Ruby implementations.

Investigating failures in real Ruby applications and libraries is more useful than fixing RubySpec bugs as it unblocks real scenarios that other users will want to try out. A few important applications and libraries are:

  1. RSpec
  2. Sinatra
  3. Merb

You can find more libraries to try out at http://www.ruby-lang.org/en/libraries/

Writing IronRuby (CLR) samples

We need samples using CLR libraries to spotlight the CLR intergration. Here are some existing C# and VB.Net samples that can be ported to IronRuby. The focus should be on apps that pull together functionality of existing CLR assemblies. Do not spend time on samples like games that might look flashy, but where a lot of the work will be spent on writing the game logic in Ruby which would not push on the CLR intergration of IronRuby.

Also, please include unit tests for the sample so that the IronRuby team can easily keep the sample working even as the IronRuby platform changes. Without unit-tests, it will be hard to keep the sample working, and it might get discarded.

  1. 3D Cube animation
  2. IronPython cookbook

Who is working on what

See the People page for contact information of the contributors, or send an email to the mailing list. If you want to collaborate on any of the tasks, please contact the persons listed below. They would appreciate getting help, and you can coordinate your efforts.

If you have your name listed below, please update this page with information about your status (even if it is to say something like “I wont be working on this for the next two weeks…”), if there are tasks you are looking for collaborators, etc.

Jimmy Schementi

including Silverline – Rails and Silverlight integration

RubyGems

Shri Borde, Jirapong Nanta

We have reduced the number of instruction from 200+ down to about 20. The current results are here. Instructions for running the unit-tests:

c:\> REM - unset ruby_opt in case it contains "-rubygems"
c:\> SET RUBYOPT=
c:\> REM - set temp folder to c:\temp to workaround error in open-uri.rb "No such file or directory or permission denied"
c:\> SET TEMP=c:\temp
c:\> SET TMP=c:\temp
c:\>svn co http://rubygems.rubyforge.org/svn/trunk/ rubygems
c:\rubygems> gem i minitest
c:\rubygems> gem i builder
c:\rubygems> REM - You may need to edit unit.rb to make it work under Windows to workaround http://redmine.ruby-lang.org/issues/show/1366
c:\rubygems> REM - unit.rb line 17: (Pathname.new Dir.pwd.downcase)
c:\rubygems> attrib -r c:\ruby\lib\ruby\gems\1.8\gems\minitest-1.3.1\lib\minitest\unit.rb
c:\rubygems> notepad c:\ruby\lib\ruby\gems\1.8\gems\minitest-1.3.1\lib\minitest\unit.rb
c:\rubygems> REM - run a single test to make sure it works with MRI
c:\rubygems> ruby.exe test\test_gem.rb -n test_self_all_load_paths
c:\rubygems> REM - Create a file named gem_tests.rb like http://gist.github.com/80962#
c:\rubygems> notepad gem_tests.rb
c:\rubygems> REM - Run all tests with MRI to get a baseline. There will be 5 failures
c:\rubygems> ruby.exe gem_tests.rb
c:\rubygems> REM - *** Now switch to IronRuby ***
c:\rubygems> set GEM_PATH=c:\ruby\lib\ruby\gems\1.8
c:\rubygems> ir.exe test\test_gem.rb -n test_self_all_load_paths
c:\rubygems> REM - Change TOPDIR, ruby_install_name, RUBY_INSTALL_NAME, and bindir in Merlin\Main\Languages\Ruby\Libs\rbconfig.rb to avoid "The system cannot find the path specified." in some of the tests.
c:\rubygems> ir.exe gem_tests.rb
c:\rubygems> REM - The latest results should look http://gist.github.com/92738 (see the bottom for the stats)

Cucumber

Chamini Gallage

Thibaut Barrère

Jimmy Schementi, Ivan Porto Carrero

Daniele Alessandri

Status: the master branch (compatible with Hpricot 0.6.164) and the 0.7_experimental branch (compatible with Hpricot 0.8.1) in the repository both pass all the tests of the original Hpricot test suite, what is left is a major clean up and some refinements to the code.

Daniele Alessandri

Status: it somewhat works but needs to be tested, so bugs are expected at this stage. A rewriting of the original definition file for Ragel is planned to improve the C# code of the ParserEngine class which currently is not so object oriented.

Jimmy Schementi

Project State: Alpha
Developer(s): Ray Vernagus
A Ruby wrapper on top of the .NET Data Provider Model. This wrapper will become the basis for an ActiveRecord adapter giving IronRuby developers the ability to use the ActiveRecord gem with their choice of database.

Jirapong Nanta (doing initial investigation)

Shay Friedman

Status – project was created, started porting the Silverlight code.

Thibaut Barrère

RubySpec bugs

Tim Chen

RSpec + .NET mocking frameworks

Mark Ryall

Mixing Ruby mocking with .NET mocking frameworks

Mark Ryall, Ivan Porto Carrero

Ivan Porto Carrero