Nant Complexity and the Boo Build System

When I first read the announcement about the Boo Build System (whose acronym I will refrain from using) I wasn’t sure it was necessary. Today I saw an announcement for the ability of Nantbuilder and realized I was very wrong.

Anyone who has used GNU Build tools will know how complex a build system can get. Why isn’t make just good enough? Why aren’t nant or msbuild good enough?

I really don’t believe that the boo build system solves the complexity of a large build system. That said I do believe that an equivalent build project in boobs would be far easier to read than its nant counterpart just due to the nature of boo vs. xml.

Lets take a look at a trivial project configuration in Nant vs. Boobs.

<?xml version=”1.0″?>
<project name=”Hello World” default=”build” basedir=”.”>
    <description>The Hello World of build files.</description>
    <property name=”debug” value=”true” overwrite=”false” />
    <target name=”clean” description=”remove all generated files”>
        <delete file=”HelloWorld.exe” failonerror=”false” />
        <delete file=”HelloWorld.pdb” failonerror=”false” />
    </target>
    <target name=”build” description=”compiles the source code”>
        <csc target=”exe” output=”HelloWorld.exe” debug=”${debug}”>
            <sources>
                <includes name=”Hello.cs” />
            </sources>
        </csc>
    </target>
</project>

vs.

import Boobs.Engine
import Boobs.Compiler.Extensions

Task(“build”) do (ctx):
    Csc(
        SourcesSet : [“hello.cs”],
        OutputFile : “HelloWorld.exe”,
        OutputTarget: TargetType.Exe
        ).Execute()

Task(“clean”) do:
    if Exist(“HelloWorld.exe”): Rm(“HelloWorld.exe”)
    if Exist(“HelloWorld.pdb”): Rm(“HelloWorld.pdb”)

Task(“default”, [“build”])

I know which one I’d rather maintain and I haven’t even used control flow logic. I have always though if statements in XML were goofy at best and stupid normally. In boobs, it IS boo. the if statement is boo’s if statement.

Need to iterate over numbered files? Use boo’s for statement or while statement. These things have always felt awkward in XML. This isn’t Nant that is falling short, it is XML.

If you have a nant configuration which is working for you, then by all means keep it up! But if you are just breaking into CI and thinking about Nant, you may want to consider the boo build system.

1 thought on “Nant Complexity and the Boo Build System”

  1. Hi Jay,

    I was just trying to figure out how to accomplish the following in an NAnt task. When I attempt to execute this, I get an error during compilation.

    if test=”${current-day < 10}” where current-day is an integer based property. Is there a way to get this if condition to work with the less than (‘<‘) operator or is there an alternative way to accomplish this?

    Thanks.

    –Friend of “The Gleek”

Comments are closed.