Changes between Version 1 and Version 2 of Development/FixingNewbie


Ignore:
Timestamp:
Nov 26, 2010, 8:55:36 AM (9 years ago)
Author:
erikd
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Development/FixingNewbie

    v1 v2  
    1 Fixing Newbie Bugs
     1
     2= Fixing Newbie Bugs =
     3
     4So, you'd like to contribute to DDC but don't know how? Then this page is for you!
     5
     6I will assume that you have already figured out how to use [wiki:UsingDarcs darcs] (especially the part about setting up a bug fix branch) to get the source code and you've built it and run the test suite. I'll also assume that you have picked a bug on [http://disciple.ouroborus.net/report/9 newbie list] of the bug tracker that you'd like to work on.
     7
     8The next step is to see if there is already a test case in the darcs tree. Test cases for bugs which have not been fixed yet are put in the `test/Broken-skip` part of the ddc darcs tree. For say bug number `XXX`, there may already be a test case called '''`TXXX-BugName`'''. If you list the '''`TXXX-BugName`''' directory, you will find that it probably contains a single file named '''`Test.ds`''' or '''`Main.ds`'''. With the compiler already built, you can try compiling the test case using the command:
     9
     10{{{
     11bin/ddc test/Broken-skip/TXXX-BugName/Test.ds
     12}}}
     13
     14which should produce a similar error message to the one in the bug report.
     15
     16If there isn't already a test case, you should add a '''`TXXX-BugName`''' directory and a appropriate test file.
     17
     18At this stage its usually a good idea to add a simple shell script in the top level directory, which will build the compiler and run your test case with a simple command. This shell script (which can be named say '''`run.sh`''') might look a little like this (modify to suit):
     19
     20{{{
     21#!/bin/bash
     22
     23make || exit 1
     24
     25bin/ddc test/Broken-skip/TXXX-BugName/Test.ds 2>&1
     26}}}
     27
     28Depending on the particular problem you're working on you may want to add '''`-v`''' or one of the '''`-dump-*`''' command line options to the '''`ddc`''' command line.
     29
     30Once you have all this set up, its time to start adding debug print statements to help track down the problem.
     31
     32When you have a fix for the bug, you can use '''`darcs`''' to send a patch to the mailing list.
     33