bug-standards
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Suggestion: Referencing Foreign Bugs


From: Matej Urbas
Subject: Suggestion: Referencing Foreign Bugs
Date: Thu, 18 Mar 2010 14:05:52 +0000

Dear Madam/Sir,

Follows a proposal for referencing foreign bugs (bug reports) in source
files.

Motivation:

        In interrelated Open Source projects it often happens that
        developers workaround some problem caused by a bug in another
        (distantly) related project. A reason for workarounds like this
        is that sometimes it just takes too long for the (distantly
        related) bugs to be fixed, or maybe the bug conflicts with
        related project's development policies.
        
        This is obviously a can of worms—especially if these workarounds
        introduce inefficient/ugly code. Also, workarounds can easily be
        forgotten in the course of time.

Proposal:

        Thus, I propose a standard commenting format for weak foreign
        bugs references. Example 1: 
        
        int a = getSomeNumber(); 
        // We have to do something crazy because of a bug in some other
        project. 
        //[WABUG:https://bugzilla.redhat.com/show_bug.cgi?id=527510]
        while (a < 10) {
        a = getSomeOtherNumber();
        }
        
        Example 2 (with the option to auto-fix the code when the bug is
        finally fixed):
        
        /*[WABUG.autofix,delete 1-3?
         * // This code will be used after the referenced bug is fixed
         * a = a + 10;
         *:https://bugzilla.redhat.com/show_bug.cgi?id=527510]
         */
        while (a < 10) {
        a = getSomeOtherNumber();
        }

Notation draft:

        \[ WABUG [ . <action> { , <action> } ] [ ? <code> ] : <uri> \]
        
        action -- A mnemonic telling what to when the bug gets fixed
        (e.g.: autofix, delete A-B, run COMMAND etc.).
        code -- The code that should be used after the bug is fixed.
        uri -- Is the address of the report for the related bug (e.g., a
        bugzilla interface etc.).

Benefits:

        * Software can be written to scan for wabugs and notify
        developers or take some action if a related bug has been finally
        fixed.
        
        * This can be used in any textual document.
        
        * The bug-reporting and referencing infrastructure is already
        available, we just have to make use of it.

I hope this makes sense.

Best regards,
---
Matej

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]