Just an interesting aside, brought on by the "backward compatibility
issue"...

Is the code correct based on purely in it's own context, or is it correct
based on what users expect? If the latter, is this based on current active
users who realize there is a bug, or based on users who don't realize there
is a bug and just expect it to keep working the same way?

And now back to your regularly scheduled thread...

Here's an idea:

The .NET Framework team is trying really hard to solve the issues of
versioning and not breaking backward compatibility. Although there are still
many issues to be solved, they have created solutions for some. I'm
wondering if we can take a page from their play book.

In this particular case, it might be time to start putting version stamps in
the project file header so that Nant will know how to behave.

Just like the way the .NET Framework side-by-side assemblies are suppose to
work where you can configure an application to pick a particular version of
an assembly, it might be a good idea to do something similar to Nant.

I'm thinking that when Nant starts up, it checks its config file for a
"preferred version". Later when it reads a project file, and if it discovers
a "preferred version" attribute on the project, Nant will take on the
behavior of the version of Nant at that time. If there is no preferred
version, the latest and greatest version behavior is used.

(This is similar to how DirectX and TAPI work. When you initialize these API
engines, you pass in the version that you wrote the code in. The idea is
that the engines will behave as they did for that particular version.)

This way people who were depending on the broken behavior of "if
uptodatefile" can still continue working simply by tweaking either the Nant
config file or particular build files.

The downside of this will be the need for greater coordination among open
source developers about bumping the version number for the
schema/interface/whatchamacallit when behavior changes due to a new feature,
or bug fix. The bar for the documentation will also have to go up since now
the behavior for each version needs to documented. The complexity of Nant
goes up a little bit more making dev ramp up time a little longer.

The downside may far outweight the potential benefit and we just say "Screw
it. Nant is a tool for developers. Developers are smart. Developers will
figure it out, eventually ... if they RTFM ... and read the source code ...
and look at the code history on CVS ... ask questions on Nant-users ... and
ask questions on Nant-dev ..." :-)

[Side thought: Potentially, the versioning can be applied at the task level
so that the version number doesn't grow out of control. I don't know if
users will be thinking of "I'm  using 1.5 of csc, but 1.1 of link." or "I'm
using Nant version 1.3.". Probably the latter.]

- Ants


|  -----Original Message-----
|  From: [EMAIL PROTECTED] 
|  [mailto:[EMAIL PROTECTED] On 
|  Behalf Of Gert Driesen
|  Sent: Friday, 22 August, 2003 07:35
|  To: Jasper Keuper; [EMAIL PROTECTED]
|  Subject: Re: [nant-dev] NUnit2Task Default Formatter
|  
|  
|  Hi Jasper,
|  
|  I'm not sure if this is the correct fix for this issue ...
|  
|  I'd rather remove the default formatter altogether, but that 
|  would break backward compatibility. But if we can correct 
|  wrong behaviour, we should do it as soon as possible ...
|  
|  Ian, what do you think ?
|  
|  Gert
|  
|  ----- Original Message ----- 
|  From: "Jasper Keuper" <[EMAIL PROTECTED]>
|  To: <[EMAIL PROTECTED]>
|  Sent: Tuesday, August 19, 2003 5:44 PM
|  Subject: [nant-dev] NUnit2Task Default Formatter
|  
|  
|  Hi,
|  
|  when working with NUnit2Task I saw that the output of the 
|  test always showed up twice when specifying a formatter.
|  
|  This is caused by always adding a defaultFormatter, even 
|  when there are formatters specified.
|  
|  Added: if (_formatterElements.Count == 0)
|  
|  The patch is copied below, also attached as NUnit2Task.patch
|  
|  Jasper.
|  
|  
|  -----
|  Index: src/NAnt.NUnit/NUnit2/NUnit2Task.cs
|  ===================================================================
|  RCS file: /cvsroot/nant/nant/src/NAnt.NUnit/NUnit2/NUnit2Task.cs,v
|  retrieving revision 1.19
|  diff -u -r1.19 NUnit2Task.cs
|  --- src/NAnt.NUnit/NUnit2/NUnit2Task.cs 25 May 2003 08:20:26 
|  -0000 1.19
|  +++ src/NAnt.NUnit/NUnit2/NUnit2Task.cs 19 Aug 2003 15:30:11 -0000
|  @@ -124,11 +124,13 @@
|           /// </summary>
|           /// <param name="taskNode"><see cref="XmlNode" /> 
|  containing the XML fragment used to initialize this task 
|  instance.</param>
|           protected override void InitializeTask(XmlNode taskNode) {
|  -            FormatterElement defaultFormatter = new 
|  FormatterElement();
|  -            defaultFormatter.Project = Project;
|  -            defaultFormatter.Type = FormatterType.Plain;
|  -            defaultFormatter.UseFile = false;
|  -            _formatterElements.Add(defaultFormatter);
|  +            if (_formatterElements.Count == 0) {
|  +                FormatterElement defaultFormatter = new 
|  FormatterElement();
|  +                defaultFormatter.Project = Project;
|  +                defaultFormatter.Type = FormatterType.Plain;
|  +                defaultFormatter.UseFile = false;
|  +                _formatterElements.Add(defaultFormatter);
|  +            }
|           }
|  
|           /// <summary>
|  @@ -340,4 +342,4 @@
|               #endregion Private Instance Fields
|           }
|       }
|  -}
|  \ No newline at end of file
|  +}
|  
|  
|  
|  -------------------------------------------------------
|  This SF.net email is sponsored by: VM Ware
|  With VMware you can run multiple operating systems on a 
|  single machine. WITHOUT REBOOTING! Mix Linux / Windows / 
|  Novell virtual machines at the same time. Free trial click 
|  here:http://www.vmware.com/wl/offer/358/0
|  _______________________________________________
|  nant-developers mailing list [EMAIL PROTECTED]
|  https://lists.sourceforge.net/lists/listinfo/nant-developers
|  



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers

Reply via email to