dkangala / hamake

Automatically exported from code.google.com/p/hamake
0 stars 0 forks source link

<dependencies> handling question #52

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It appears that files specified in <dependencies> elements are used for 
calculation of the dependency tree, but not for determination of whether or not 
the rule will actually be executed.  In other words, if a file listed in 
<dependencies> for a rule matches the output of another rule the other rule 
will be executed first (if at all), but if such a file has a timestamp later 
than that of an output file of the rule for which it was specified it will not 
force the rule's task to be executed.

The manual is ambiguous about this behavior; all it says is: "In case you want 
to specify some external data a dataflow transformation rule will depend on, 
you can use <dependencies> tag whithin <foreach> or <fold> elements."

My expectation would be that if a file listed in <dependencies> is newer than 
that an output file of the same rule, then that rule's task _will_ be executed. 
 In the case of <foreach>, this means that it will be executed once for each 
input (or batch of inputs) whose output is older than any <dependencies> file.  
In the case of <fold> this would make <dependencies> effectively synonymous 
with <input>.

If it really is the intent that <dependencies> affect only the order of 
execution of tasks, and not whether or not the tasks are executed, then I 
propose adding a flag to <foreach> that enables the behavior I expected as 
described above: an "execute on dependency change" attribute or some such.

-peter

Original issue reported on code.google.com by petenewc...@gmail.com on 25 Aug 2011 at 10:17