redoing unnecessary targets when a do file is modified but the output remains unchanged

From: Karolis K <karolis.koncevicius_at_domain.hidden>
Date: Wed, 17 Feb 2021 22:40:08 +0200
Message-Id: <8A9A850D-20DE-48CD-99D4-5FCCA3BE40B8_at_domain.hidden>
Hello,

I recently encountered a behaviour that seems to be sub-optimal.

Consider a simple example with 2 do files:

A.txt.do:

echo “some text here”

B.txt.do:

redo-ifchange A.txt
cat A.txt | tr [:lower:] [:upper:]

After calling redo B.txt the targets are produced.

Now consider a cosmetic change to A.txt.do - for example - adding an empty line at the end of the file.
First - redo-ood will show that both A.txt and B.txt are out of date.
Then, if I redo-ifchange A.txt and call redo-ood after that - B.txt is no longer presented as being out of date.
However, if instead of the above I call redo-ifchange B.txt the file B.txt will also be rebuilt, even thou none of it’s direct dependencies changed.

This is of course a simple toy example, in one real project I encountered a situation where multiple targets were being rebuilt multiple times, all after adding an empty line to one of the do scripts.

In an ideal case I think only the file with a modified do script should be rebuilt, and then, since the output is the same, all other dependencies should simply pass.

But maybe I am missing something?

Thanks a lot for this redo implementation,
Kind regards,
Karolis K.
Received on 2021-02-17 20:40:08 UTC

This archive was generated by hypermail 2.4.0 : 2021-02-19 09:13:02 UTC