I would say that if you use a task in the exclude filter, you expect it to
be called at some point. Either by the filter or before. Since it is a
FileTask, it will only be called once (I only implemented support for
FileTask, not generic Rake Tasks).

For the two boolean values, something's wrong with that ? I wanted to make
sure both tasks ran and being able to debug it.

I don't use tasks in include and exclude but Regexps and Procs made me able
to hack support for some pretty special packaging of OSGi:
http://github.com/intalio/buildr4osgi/blob/master/lib/buildr4osgi/osgi/packaging.rb
see line 243. I'm not very happy with the code but it works.

On Sat, Mar 27, 2010 at 09:26, lacton <[email protected]> wrote:

> On Sat, Mar 27, 2010 at 3:16 PM, Alex Boisvert <[email protected]>
> wrote:
> > On Sat, Mar 27, 2010 at 4:19 AM, lacton <[email protected]
> >wrote:
> >
> >> I have two questions.
> >>
> >> 1. Why should buildr invoke a FileTask given to the exclude() method?
> >> For the include() method, I understand and appreciate the feature, but
> >> I don't understand the point for the exclude method.
> >>
> >
> > I was also perplexed when I suggested it.    The valid use cases are few
> and
> > far between.   I think the main reason is to maintain symmetry with
> > include().
> >
> > alex
>
> So, it seems to be a choice between API clarity through symmetry and
> runtime performance (i.e., fewer tasks to run).
>
> Both ways seem valid to me.  What do the others think about this issue?
>
> lacton
>

Reply via email to