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

Contributing

jschementi edited this page Sep 13, 2010 · 69 revisions
Parts of the codebase where contributions are accepted
Contributing a patch
Ideas for contributions
Who is working on what

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 where contributions are accepted

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.
  • Once you get a reply to the email, send a pull request from your github.com fork website.
  • The IronRuby team will pull contributions every week or so. An email is generally sent to the mailing list about when this will happen so the contributors can do a fresh pull from irmain into their fork and do any necessary merge conflict resolutions.

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/file
  2. 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. RSS, Finalize, Shell, WeakRef
  2. win32console – This is needed by Cucumber: to print test results in color.

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. Rails
  2. RSpec
  3. Sinatra
  4. Merb

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

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. IronRuby Tutorial – The source is in Merlin/Main/Languages/Ruby/Samples/Tutorial/Tutorials/ironruby_tutorial.rb. You can improve the content that already exists, making the flow better, dealing with incorrect user input and making useful suggestions, etc. You can also add more content to it. IronPython cookbook – has samples that could be ported over to the Tutorial. As more content is added, you might need more functionality from the framework (tutorial.rb). For example, the tutorial does not support checking for prerequisite software. You also add such functionality as needed, thereby gradually improving the framework.

Miscellaneous

  1. ruby-debug – You can implement this extension building on the DLR debugging infrastructure. Contact the mailing list for any changes you need in IronRuby.dll.
  2. isitironruby.com – Port http://isitruby19.com/ for use with IronRuby.
  3. Submit patches to various libraries – This page documents changes that need to be made in various libraries. You can review the changes, improve on them, open a bug in the respective project, submit a patch, follow up to ensure that the patch gets accepted, and then report back to the mailing list.
  4. Support for loading native extensions (written in C) – IronClad enables using native extensions in IronPython. A similar version could be done for IronRuby.

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.

Also, make sure your project is represented in ironruby-contrib.

Jimmy Schementi, Ray Vernagus

Details status about setting up Rails, running the unit tests, etc, is at http://www.ironruby.net/Documentation/Rails.

Silverline – Rails and Silverlight integration

Jimmy Schementi

This was last demoed at RailsConf 2008.

RubyGems

Shri Borde, Jirapong Nanta

We have reduced the number of failueres from 200+ down to about 20. The current results are here. The tests can now be run from a Dev.bat environment, and will soon be part of continuous integration. So this project is mostly wrapping up (successfully).

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 100% Ruby wrapper on top of the .NET Data Provider Model. It currently supports SQL Server and Oracle but will gradually include all databases that publish a .NET Data Provider. IRDb can be used alone or it can be used in conjunction with Rails through the activerecord-irdb-adapter.

Jirapong Nanta

Status: There are about 330 methods for OpenSSL library. Less than ten RubySpec are available. The focus of the project will be implementation the functionality that is needed for RubyGems and Rails scenarios. e.g. OpenSSL::X509::Certificate. Current results of running mspec ci library\openssl can be found here.

Work process:

  • Checkout ruby 1.8 source code
  • review OpenSsl implementation in C (ruby_1_8\ext\openssl)
  • review OpenSsl usage in RubyGems (e.g. rubygems\lib\rubygems\gem_openssl.rb)
  • write RubySpec
  • implement a wrapper to System.Security.Cryptography namespaces
  • Refactor < – > Push

Some useful documentations can be found at http://technorama.net/~oss/ruby/openssl/doc/

Shay Friedman

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

Thibaut Barrère

RubySpec bugs

Tim Chen

Mixing Ruby mocking with .NET mocking frameworks

Mark Ryall, Ivan Porto Carrero

Investigated Moq and NMock and found that they were not a good match. A project called Caricature has been started to implement mocking directly in IronRuby

Ivan Porto Carrero

Ivan Porto Carrero

Run Rack-based Ruby application on IIS with IronRuby

Jimmy Schementi, Justin Rudd

Compile C#, Visual Basic, or F# code inline with your IronRuby programs!

Ray Vernagus