[Rake-devel] [NEWBIE] task prerequisits and failures

Assaf Arkin assaf at labnotes.org
Tue Jul 15 20:27:30 EDT 2008


On Tue, Jul 15, 2008 at 10:48 AM, Hugh Sasse <hgs at dmu.ac.uk> wrote:
>
> Pardon my top posting, but the layout below is (at least for me) confusing.
> It looks like Assaf Arkin has answered his own question and asked another.
> Could people use the long established convention of preceding quoted lines
> with "> " or "| ", please?

Sorry about that. It reads fine in HTML, but for some reason don't get
translated in the plain text sent along with the email, so I switched
to plain text.

>
> As far as I can see there is no command line option to tell rake that certain
> tasks are considered up to date, so don't need executing.  ISTR Gnu make
> can do that, so maybe split the rakefile, and invoke using gnu make? There's
> probably a better answer, though.

Shouldn't the be the responsibility of the task?  A task can decide if
it needs executing and return true/false from needed?().

Assaf

>
>        Hugh
>
> On Tue, 15 Jul 2008, Assaf Arkin wrote:
>
>>
>> On Tue, Jul 15, 2008 at 4:06 AM, Ittay Dror <ittay.dror at gmail.com> wrote:
>>
>>
>>      Assaf Arkin wrote:
>>
>>                  How can I stop invocation of dependent
>>                  tasks? By raising an exception
>>                  from the prerequisite action?
>>
>>
>> If the task fails, raise an exception.  That will just bubble up
>> and get Rake to dump the exception and stop executing.
>>
>> Is there a way for a dependent task to ignore failures in the
>> dependency tasks?
>>
>>
>> You can invoke the dependent task directly and just catch the error.
>>
>> Assaf
>>
>>
>>
>>
>>            -- Assaf
>>            http://labnotes.org
>>
>>
>>
>>      Thank you,
>>      Ittay
>>      _______________________________________________
>>      Rake-devel mailing list
>>      Rake-devel at rubyforge.org
>>      http://rubyforge.org/mailman/listinfo/rake-devel
>>
>>
>>    ___________________________________________________________________________
>>  _______________________________________________
>> Rake-devel mailing list
>> Rake-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rake-devel
>>
>>
>>  -- --
>> Ittay Dror <ittay.dror at gmail.com>
>>
>> _______________________________________________
>> Rake-devel mailing list
>> Rake-devel at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rake-devel
>>
>>
>>
>
> _______________________________________________
> Rake-devel mailing list
> Rake-devel at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rake-devel


More information about the Rake-devel mailing list