Changes between Version 2 and Version 3 of WorkingConventions/FixingBugs


Ignore:
Timestamp:
Sep 26, 2007 9:14:35 AM (7 years ago)
Author:
simonpj
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WorkingConventions/FixingBugs

    v2 v3  
    55Here's how to go about it. 
    66 
    7  * Make sure the bug is in Trac.  Usually it is (that's why you are working on it), but if it's a bug you have found yourself, add it to Trac before you start work.   
    8   
    9  * Take ownership of the bug in Trac, by using the "Action" chunk at the bottom of the Trac bug display (you need to be logged in to see it), and putting your name in the "reassign to" box.  This makes sure that two people don't work on the same bug.  If you later decide you can't do it after all, remove your name. 
    10  
    11  * Add a test case in the [wiki:Building/RunningTests regression-test suite] that shows up the bug.   
     7 0. '''Make sure the bug is in Trac'''.  Usually it is (that's why you are working on it), but if it's a bug you have found yourself, add it to Trac before you start work.  [[BR]][[BR]] 
     8 0. Take ownership of the bug in Trac, by using the "Action" chunk at the bottom of the Trac bug display (you need to be logged in to see it), and putting your name in the "reassign to" box.  This makes sure that two people don't work on the same bug.  If you later decide you can't do it after all, remove your name.[[BR]][[BR]] 
     9 0. '''Add a test case''' in the [wiki:Building/RunningTests regression-test suite] that shows up the bug.   
    1210   * Put the name of the test in the "Test Case" field of the Trac report.   
    13    * Put a reference to the Trac bug e.g. "Trac #1466" in a comment in the test case. 
    14  
    15  * Follow our [wiki:WorkingConventions#Coding coding conventions] 
    16  
    17  * Comment your fix in the source code, and include a reference to the bug ticket number, e.g. "`#1466`" (this helps when grepping for the fix later).  It is often helpful to give a small example code fragment that demonstrates the need for your fix.  This isn't always relevant; sometimes you are fixing a plain error, but often it's more subtle than that. 
    18  
    19  * Record a patch that embodies your fix.  Please follow our convention for naming patches: [wiki:WorkingConventions/Darcs#PatchNaming]. 
    20  
    21  * Test your patch using the [wiki:TestingPatches validation script], before you submit it.  (If you have write permission to the repository, then you '''must''' validate before pushing the patch.) 
    22  
    23  * If you don't have commit permission for the repository,  
     11   * Put a reference to the Trac bug e.g. "Trac #1466" in a comment in the test case.[[BR]][[BR]] 
     12 0. '''Fix the bug'''! 
     13   * Please follow our [wiki:WorkingConventions#Coding coding conventions] 
     14   * Comment your fix in the source code, and include a reference to the bug ticket number, e.g. "`#1466`" (this helps when grepping for the fix later).  It is often helpful to give a small example code fragment that demonstrates the need for your fix.  This isn't always relevant; sometimes you are fixing a plain error, but often it's more subtle than that.[[BR]][[BR]] 
     15 0. '''Record a patch''' that embodies your fix.  Please follow our convention for naming patches: [wiki:WorkingConventions/Darcs#PatchNaming].[[BR]][[BR]] 
     16 0. '''Test your patch''' using the [wiki:TestingPatches validation script], before you submit it.  (If you have write permission to the repository, then you '''must''' validate before pushing the patch.)[[BR]][[BR]] 
     17 0. '''Submit your patch'''.  If you don't have commit permission for the repository,  
    2418   * Use 'darcs send' to create a patch bundle 
    2519   * Attach the patch bundle to the Trac bug report 
     
    2721   * Change the owner of the bug to the GHC support engineer (currently 'igloo') 
    2822   This shifts responsibility to the GHC team to review and commit your patch. 
     23   
     24   If you do have commit permission, then commit, update the Trac report, and close the bug. 
    2925 
    3026Then have a beer on us.  We are truly grateful.