Contribution Ideas

rdp edited this page Sep 13, 2010 · 3 revisions

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. Cucumber now uses iron-term-ansicolor when run under IronRuby for color output
  3. fakefs – Used by RSpec’s test suite. Need to get this running first to verify that RSpec 2 runs under IronRuby

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.
  5. Create demos showing how to integrate rails with IronRuby (SilverLight?) for a pure Ruby “stack” all the way to the browser.