Monday, May 17, 2004

NAnt - Part 1

I've been developing a new build system for my project. Since we are developing entirely in C# under .NET I am using NAnt. NAnt is the .NET version of Java project Ant. It represents an enormous step forward in build technology. I won't go into great detail here since this is a topic that has been widely written about here and here and here.

NAnt is a step forward because it is smart. The tasks in NAnt have parameters and and actions that are relevant to performing builds. There are tasks for creating directories, deleting files, running regression (Nunit) tests, and creating NDoc documentation sets. NAnt is also extensible. New tasks can be created as C# assemblies and are seamlessly integrated into NAnt.

Contrast this to old systems such as nmake and make by comparison were dumb tools. The old systems were really just scripting environments with some intelligence about dependencies. Build systems always had to be supplemented with shell scripts or perl scripts. On top of that they had crappy syntax. A Tab was an significant piece of syntax. If you missed a tab all was lost.

Builds based on make were so difficult to create we didn't even bother with it the build system at my last company. As it turns out the the feature of tracking dependences isn't that important. Computers today are so fast that it is almost always worth it to recompile everything from the top. NAnt is like having a set of tools tailored for doing builds. More to come ...

No comments: