Subject: Re: Multiple calls to redo-* for same target results in multiple .rec entries

From: goredo <[email-masked]>
Date: Tue, 9 Nov 2021 13:43:58 +0000 (UTC)

Thanks!

I was just wondering about the exact semantics.

For instance, I can force a non-empty target always OOD by creating an -ifcreate dependency on itself. Because the output is now clearly there, which signals OOD. If this is intended, could you document that in the FAQ? Because it's hard for newcomers to grasp the idioms of redo.

I also was wondering what redo-stamp currently does, exactly. apenwarr/redo uses it to achieve the behaviour that the output of a target can be independent of it's hash. They use it like the following:
```
redo-ifchange $input_files
cmd $input_files >$3
for f in $input_files; do
  redo-stamp <$f
done
```

So, you may use the output for further computation, but the notion of the target being OOD depends entirely on the input files. This circumvents problems when cmd produces non-reproducible output, ie. including time stamps or PIDs.

Supporting redo-stamp would mean, whenever a .rec file contains a stamp entry, change times, size and hash are ignored in favor of the stamps hash.

Would you consider this? This is a feature that implicit output hashing cannot recreate.

Kind regards,
–Michael