public inbox for goredo-devel@lists.stargrave.org
Atom feed
From: "Niklas Böhm" <mail@jnboehm•com>
To: goredo-devel@lists.cypherpunks.su
Subject: Unexpected behavior in redoing target with missing .redo info
Date: Fri, 5 Dec 2025 19:30:26 +0100 [thread overview]
Message-ID: <c9832cec-fb46-45a5-b102-3fde7d0d9a4c@jnboehm.com> (raw)
Hi,
I observed the following problem with using redo and would like to
challenge the current behavior of the program.
I have the following file with one line, 1.do:
echo hi > $3
When I now call `redo 1`, everything works as expected. But in case the
file `1` already exists (or you remove the folder `.redo/`), then the
call to `redo 1` throws the following error:
err 1 (0.001s): $1 was explicitly touched
I think that this is a bug (most probably related to run.go l.674 or so)
and the behavior should be to either (a) detect it as a source file and
not redo it (the behavior if the file `1.do` did not exist) or (b) redo
the target properly. I strongly prefer option (a), as we should not
mess with a file that we do not know the origin of.
At the very least, the error message about $1 being touched (which is
not happening in this scenario) is quite misleading (I actually thought
that I misunderstood something about this). There might be a logic
error with regards to when the presence of a source file if checked and
the presence of a .do file.
Let me know what you think! And thanks for goredo :)
Greetings
Nik
next reply other threads:[~2025-12-05 18:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-05 18:30 Niklas Böhm [this message]
2025-12-05 19:26 ` Unexpected behavior in redoing target with missing .redo info goredo
2025-12-12 15:38 ` Sergey Matveev
2025-12-16 13:45 ` Sergey Matveev