buildr-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Assaf Arkin" <>
Subject Re: [buildr] Compile and test order
Date Thu, 14 Aug 2008 21:42:40 GMT
On Thu, Aug 14, 2008 at 2:11 PM, lacton <> wrote:
> The order of compile and test tasks puzzles me.
> Let's say we have two projects called foo and bar, and foo depends on
> bar. Calling the 'build' or 'test' tasks will run tasks in the
> following order.
> 1. bar:compile
> 2. foo:compile
> 3. bar:test
> 4. foo:test
> I would expect 'bar:test' to run before anything is done to 'foo',
> because whatever is done with 'foo' will probably be a waste of time
> if 'bar:test' fails. (Unless I know what I'm doing and I choose to add
> 'test=no' or 'test=all'.)
> I propose this instead.
> 1. bar:compile
> 2'. bar:test  --> build will stop here if a test fails (unless
> overridden by user)
> 3'. foo:compile
> 4. foo:test
> Is there something I'm missing?  What do you think of my proposal?

I like it.

foo:compile depends on bar's packaging task, which in turn depends on
bar:build which in turn depends on bar:compile, but not bar:test.
What you're asking is essentially to make bar:build run bar:test.

(The global build task runs the global test task, but for each
individual project there's no such dependency)

It will be an easy change, but we need to make sure it doesn't have
nasty side effects.  Consider this:

Scenario 1: I'm working on foo, I made some changes to the code, I run
buildr foo:test.  I did not touch bar in a long while, so there's
nothing for bar to do, it would be wrong if bar:test runs at this
point in time.

Scenario 2: I'm working on foo, I made some changes to the code, but I
also made some changes to bar.  Now when I run buildr foo:test, I
expect bar to be compiled, tested and packaged before compiling foo.

I can't think of anything else we need to worry about, just make sure
we can do these two scenarios right.  Can you think of any other side


> --
> Lacton

View raw message