public inbox for goredo-devel@lists.stargrave.org
Atom feed
From: "Niklas Böhm" <mail@jnboehm•com>
To: goredo-devel@lists.cypherpunks.su
Subject: Re: Potentially unnecessary redoing of targets
Date: Mon, 12 Jan 2026 16:12:57 +0100	[thread overview]
Message-ID: <31027652-a2af-4ab5-b7cc-4037f5692e10@jnboehm.com> (raw)
In-Reply-To: <2a35cbd18f659b66275e7b5ce2138814@spacefrogg.net>

Thanks for your response.  In general, I want to say that `2` is not ood 
because `1` did not change after completion of `1.do`, hence we would 
never have to start it.  The state when `2.do` is executing is in fact 
not ood, but because we determined `1` to be ood (as 1.do that changed), 
we run `2.do` anyways.  What I would suggest is to check, once more, if 
the targets actually did change their content before launching `2.do`.

I see that currently the problem is that the ood checking goes as 
follows (with redo-ifchange -d):
[48985] dbg  ood: 2 checking
[48985] dbg  ood: 2 -> 2.do: checking
[48985] dbg  ood: 2 -> 2.do: same inode
[48985] dbg  ood: 2 -> 2.do: is source
[48985] dbg  ood: 2 -> 1: checking
[48985] dbg  ood: 2 -> 1: inode differs
[48985] dbg  ood: 2 -> 1: same hash
[48985] dbg  ood: . 1 checking
[48985] dbg  ood: . 1 -> 1.do: checking
[48985] dbg  ood: . 1 -> 1.do: inode differs
[48985] dbg  ood: . 1 -> 1.do: hash differs
[48985] dbg  ood: . 1: true
[48985] dbg  ood: 2 -> 1: ood
[48985] dbg  ood: 2: true

I want to make the claim that `2` is not necessarily ood at that point, 
as we could first redo `1` and then check if the output differs before 
determining `2` to be ood.  As the build file `2.do` did not change, we 
know that its dependencies do not change; hence in my opinion it is a 
forgone conclusion to say that `2` is ood only because `1.do` has a 
differing hash, but actually `1` itself does not.

I'll admit that it might be an involved change in the code base and will 
also make redo itself change its behavior (as you lose the transitivity 
property for ood detection), but in my eyes it would be correct to check 
the direct targets of the .do file, instead of cascading the ood 
property.  This would also make the build system minimal

Anyways, thanks for reading all of this text, I hope my point became a 
little clearer.

Cheers
Nik


  reply	other threads:[~2026-01-12 15:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2026-01-12 16:26     ` spacefrogg
2026-01-13  8:23     ` Sergey Matveev
2026-01-13 19:04       ` Niklas Böhm