[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Rake: race condition between task prerequisites

Tobie Langel

4/22/2008 12:59:00 PM

Hi,

I'm having a strange race condition between task prerequisites in the
following rakefile:

http://github.com/tobie/prototype/tree/master/Ra...

At line #49, the :test rake tasks has the following prerequisites:
:build_tests, :dist and :test_units.

:build_tests is correctly executed, as the files are generated, but
:test_units doesn't wait for the files to be generated before running.

So the first time you run :test, no tests are called. (Subsequent calls
do work, though).

I'm really not sure what I should be looking at to solve this problem.

Any pointers are welcomed.

Thanks,

Tobie
--
Posted via http://www.ruby-....

4 Answers

Simon Krahnke

4/22/2008 1:39:00 PM

0

* Tobie Langel <tobie.langel@gmail.com> (14:58) schrieb:

> I'm having a strange race condition between task prerequisites in the
> following rakefile:
>
> http://github.com/tobie/prototype/tree/master/Ra...
>
> At line #49, the :test rake tasks has the following prerequisites:
> :build_tests, :dist and :test_units.
>
> :build_tests is correctly executed, as the files are generated, but
> :test_units doesn't wait for the files to be generated before running.

If :test_units needs the result of :build_tests, the latter should be a
prerequisite of the first.

mfg, simon .... l

Tobie Langel

4/22/2008 4:56:00 PM

0

You mean as in: http://pastie.caboo... ?

I had tried that earlier too (tried it again now to double-check),
problem persists.
--
Posted via http://www.ruby-....

Tobie Langel

4/22/2008 6:22:00 PM

0

Hi again,

I ended up solving the issue. Turns out what I though was a block for
the task was actually the block defining the task.

Sorry for the hassle.

Best,

Tobie
--
Posted via http://www.ruby-....

Simon Krahnke

4/23/2008 12:18:00 AM

0

* Tobie Langel <tobie.langel@gmail.com> (20:22) schrieb:

> You mean as in: http://pastie.caboo... ?

Yes, why put it there instead just posting it here?

> I ended up solving the issue. Turns out what I though was a block for
> the task was actually the block defining the task.

But the race condition is another thing, independent of the task doing
the wrong thing.

mfg, simon .... l