@Alan, why does it make you sad to think of Ant?

You are right, Ant itself does not do any of the tasks; Ant just
builds a dependency tree of targets to other targets. But Ant tasks
(written as separate or bundled plugins) do all of the stuff like
concatenating a file, or minifying, or compiling, or running an exec,
etc.

So using your nomenclature, I am missing not the dependency tree, for,
indeed, jake (and cake) has that, using only task(). It has all I need
for dependency tree.
I am missing the bundled tasks that I can run. I want to have
directory() and file() not as a target, but as a task that can be run
inside the target, as well as some other tasks that are basic
repetitive, like minify(), concat(), etc.

For the last comment, if I were to use Ant as a model, I would find
myself with jake/cake, with many convenience functions.

On Jan 31, 7:22 am, Alan Gutierrez <[email protected]> wrote:
> Makes me sad to think of Ant.
>
> http://ant.apache.org/manual/Tasks/concat.html
>
> But, the point I'm driving at is that, yes, within a task, that task can
> stat files, and act on the timestamps. Javac does this. Some of the
> tasks do this. It's the same as if, when you wrote a Cakefile task, you
> called fs.stat a bunch of times, and only acted on dirty files.
>
> If you want to call that "management," then we're arguing over
> semantics, but you should realize that its no great shakes. Ant will not
> short circuit the execution of concat task. It will execute it. The
> concat task will stat files, then maybe do something. But, Ant is not
> doing the dependency management, the concat task is.
>
> This is not a quibble. Make builds a dependency tree. If a target is out
> of date it is built. If a target is not out of date, the code for the
> target is not executed. The target code does not check to see if gcc
> needs to run, Make does.
>
> That each task is a dependency manager makes for a lot of redundancy in
> the Ant code base. Plus, a lot of inconsistent semantics between Ant
> tasks. (Which may have smoothed a bit since I last looked at it.) Each
> task might stat a handful of files, but it doesn't cascade.
>
> If Make detects that file A is out of date, it knows it has to run C, F,
> H, L, and X. Ant runs A, then B, then C, then D, all the way to Z.
>
> Because Make knows what needs to run and in what order, Make can build
> in parallel, if the dependency tree permits it. (Yes, Ant does parallel
> too, but in the same explicit way that it does dirty checks.)
>
> You could build a helper library for your Cake, Jake, Rake files, with a
> function like:
>
> dirty(source, dest, callback)
>
> Where source and dest are globs, and the callback is called with a
> boolean, yes or no. Then you could call this from your tasks and have
> Ant like dependency management, but it wouldn't feel special. It would
> feel like you're just stating files. Ant buries this redundancy by
> virtue of XML. You can't really see the redundancy. Ant files are
> verbose in any case.
>
> I imagine that if you were to use Ant as a model, you'd find yourself,
> at the end of the day, with nothing more than Cake with a file stat
> convenience function.
>
> --
> Alan Gutierrez - @bigeasy
>
> On 1/31/12 6:36 AM, Avi Deitcher wrote:
>
>
>
>
>
>
>
> > A- you were not being combative, clever or contrary, but clarifying (it
> > must be letter C day on my kids' Sesame Street)
> > B- If it is important, then by all means, be any of the above. :-)
>
> > I disagree with you about Ant - it does do dependency management, not
> > only targets to other targets, but also some of the tasks can have
> > explicit file dependencies (e.g. concat) - but ok with the rest.
>
> > I want:
> > 1) tasks that can be called at any time, even from within targets, like
> > Ant has
> > 2) many more predefined tasks (my list earlier)
> > 3) targets as large groupings of tasks and functions that are callable
> > from the command-line
>
> > I want the best of jake meets ant.
>
> > Didn't want to duplicate efforts, but looks like I need to either build
> > it or extend jake or cake. Was hoping jake was it. I will see if it is
> > easier to extend jake or just build it.

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to