Iâ€™ve come to loath ant.
XML is great for a lot of things, but is simply painful for expressing control flow. Now donâ€™t get me wrong, itâ€™s still easier to work with than make; you can use any XML editor or a web-browser to validate the well-formedness of an ant build file. Itâ€™s just that programmatic thought isnâ€™t elegantly represented by a tree structure full of angle brackets. Trees are simplifications computer scientists use to fit information into limited structures that can be easily parsed and manipulated, however, as a user of the system I donâ€™t give a flying flock that it uses a standard SAX parser. I do care about defining basic control-flow operations in a natural way, and not having to create artificial work-arounds to cater to the structure of the tree. Elegance, however, is the least of ants problems. It lacks a fundamental development capability that is missing from other build systems such as make and jam, and even long-established shells such as bash: debuggability.
Hereâ€™s the deal, plain and simple: if youâ€™re writing a development tool, you must provide some mechanism for easy debugging. â€œHello, world!â€ does not require troubleshooting. Every other real-world â€œscriptâ€ does. If youâ€™re automating a build process for a large application, it will have bugs, and when you do get them squashed the system will soon be inadequate and require modification. Now, when I say â€œdebuggabilityâ€, Iâ€™m not talking about scattered echo/print elements throughout the code or color-coded syntax. Iâ€™m talking about stepping through the script line by line and examining the inputs and outputs of every step in the process, just like you would with any C++ or Java program,
The last item in todayâ€™s rant is support for basic data structures. Variable passing is pukingly awkard in ant, and calling other targets sometimes requires firing up another ant process. Umm.. riiiiight. â€œIf today is Saturday turn debugging support on, run all known unit tests and send a status report to all team membersâ€ is not an unrealistic use of these systems. Debugging this should not be such a chore.