Skip to main content

Duncan Davidson is being kind...

Posted by arnold on June 25, 2003 at 7:39 AM PDT

Duncan reports that I gently and kindly harangued him at MacHack about ant. I'm not so sure I was all that gentle, but I hope I was kind. It's interesting that after we talked, he said "You've got ant's killer weakness there." But what he quoted was not what I expected. His quote was:

The problem with Ant is that it violates something we learned with Unix. Tasks aren't composable.

But what I thought he would quote was my opening line:

Ant is nothing more than the sum of its parts.

I suppose it's the same critique, but my summary is more pungent. And yet he thought I was being gentle...

James Gosling once said that every configuration file becomes a programming language, so you might as well think that way. I think ant confirms this in spades. Duncan started it out as a quick way to build a few things. It has grown to be a monster. I admit it is a useful monster, but it works just like Unix would if there were no pipes. Each task has its own way of approaching issues that arise when performing that task. If you want to do something that the task author didn't think of, well, there you are. Good luck.

The Unix model would say that there were tasks that generate (say) dependency calculations and tasks that build jar files and tasks that did text transformations and tasks that deleted files. So if I wanted to delete all files that were depended on by a particular task, I would put these together. And if instead of deleting them, I wanted to jar them up, I would compose nearly the same tasks, but not quite. But with ant, these are two different tasks, unless someone happened to think of merging them.

Unix got it right. Ant needs pipes.

I'm trying to figure out how to build a platform for executing existing ant tasks and yet allow them to open up this way. Possibly something with the bean shell. Maybe jython, as Duncan started to describe.

Related Topics >>