public inbox for goredo-devel@lists.stargrave.org
Atom feed
* Potentially unnecessary redoing of targets
@ 2026-01-12  9:02 Niklas Böhm
  2026-01-12 12:53 ` spacefrogg
  0 siblings, 1 reply; 6+ messages in thread
From: Niklas Böhm @ 2026-01-12  9:02 UTC (permalink / raw)
  To: goredo-devel

Hello,

I noticed that there is some behavior with ood detection that can lead 
to unnecessary redoing of a target.

If you have the two simple files:

1.do:
echo 1

2.do:
redo-ifchange 1
sleep 3
echo 2

then calling `redo-ifchange 2` will run them, as intended.  When adding 
a comment to 1.do and again calling `redo-ifchange 2`, it will correctly 
redo the file `1` and afterwards redo itself.  This is kind of the 
crucial point.  If you Ctrl-C the redoing process while it's sleeping 
during execution of `2.do`, then it will (correctly, in my opinion) not 
redo the file `2` in a subsequent call to `redo-ifchange 2` since all of 
the dependencies are unchanged.

To me, this behavior could also be extended to be performed during 
execution of redo itself.  In this example, this would mean to check, 
again, if the dependencies have differing output before then starting 
the process of redoing `2`.

I acknowledge that this is not a trivial change in itself, though the 
additional computation time should be negligible, as the hash of `1` is 
already computed.  It would mean to change the ood detection to not 
declare `2` ood only based on `1.do` differing, but instead to check 
this after redoing `1`.

Let me know what you think about this proposed change!

Greetings
Nik


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-01-13 19:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-12  9:02 Potentially unnecessary redoing of targets Niklas Böhm
2026-01-12 12:53 ` spacefrogg
2026-01-12 15:12   ` Niklas Böhm
2026-01-12 16:26     ` spacefrogg
2026-01-13  8:23     ` Sergey Matveev
2026-01-13 19:04       ` Niklas Böhm