buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <>
Subject Re: Correct Use of the 'tap' Method
Date Thu, 23 May 2013 17:45:19 GMT
On Thu, May 23, 2013 at 10:05 AM, Adam George <> wrote:

> If "task :foo do ..." enhances the "foo" task successfully, then why does
> "task :compile do ..." seemingly not run in addition to the original
> "compile" task?

It's a matter of timing.

When using ".tap" the block executes right away (typically while 'parsing'
the buildfile).

When using  "task ... do" the block will execute if/when the task executes
(and after all previously defined logic on the task) so if you're
configuring the task, it's already too late because the gist of the task
execution has already happened.


PS: Yes, the .tap method is the same behavior as Kernel#tap.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message