public inbox for goredo-devel@lists.stargrave.org
Atom feed
From: "Niklas Böhm" <mail@jnboehm•com>
To: goredo-devel@lists.cypherpunks.su
Subject: Potentially unnecessary redoing of targets
Date: Mon, 12 Jan 2026 10:02:04 +0100	[thread overview]
Message-ID: <0c148726-8811-438e-a3d8-f56d45134ad3@jnboehm.com> (raw)

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


             reply	other threads:[~2026-01-12  9:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12  9:02 Niklas Böhm [this message]
2026-01-12 12:53 ` Potentially unnecessary redoing of targets 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