public inbox for goredo-devel@lists.cypherpunks.ru
Atom feed
From: Karolis K <karolis.koncevicius@gmail•com>
To: goredo-devel@lists.cypherpunks.ru
Subject: redoing unnecessary targets when a do file is modified but the output remains unchanged
Date: Wed, 17 Feb 2021 22:40:08 +0200	[thread overview]
Message-ID: <8A9A850D-20DE-48CD-99D4-5FCCA3BE40B8@gmail.com> (raw)

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.

             reply	other threads:[~2021-02-17 20:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 20:40 Karolis K [this message]
2021-02-21  8:38 ` redoing unnecessary targets when a do file is modified but the output remains unchanged Sergey Matveev
2021-02-27  9:09 ` Sergey Matveev
2021-05-04 22:52 Andrey Dobrovolsky
2021-05-05  7:35 ` Sergey Matveev
2021-05-05 13:52 Andrey Dobrovolsky
2021-05-05 15:11 ` Sergey Matveev
2021-05-05 18:35 Andrey Dobrovolsky