public inbox for goredo-devel@lists.stargrave.org
Atom feed
From: goredo <spacefrogg-goredo@spacefrogg•net>
To: Goredo Devel <goredo-devel@lists.cypherpunks.ru>
Subject: Arguments to redo-if*
Date: Sun, 1 Oct 2023 14:15:37 +0200 (GMT+02:00) [thread overview]
Message-ID: <19e6156e-cf10-48b7-9829-7c504e189d4d@spacefrogg.net> (raw)
Hello!
I have noticed an issue with redo-ifchange and redo-ifcreate which is hard to work with.
I am building a generalised toolchain based on redo, which provides a framework for which the actual project is not yet known. It provides many redo targets which take dependencies as user input. There, I noticed the following discrepancy between goredo and apenwarr redo: I cannot, in general avoid that a user might provide, ever in error, a dependency that starts with a dash. In apenwarr redo, redo-if* commands don't take any options but take the whole argument list as targets. goredo chokes on those arguments trying to interpret them as options. Now the issue: apenwarr redo-if* commands also don't treat a double dash argument specially (which you can use to end the option list). It treats it as a target name and chokes on it. So, for me, building this toolchain, it's impossible to secure my calls to redo-if* properly, because I would have to know whether the user uses goredo or apenwarr redo.
My suggestion is to either get rid of arguments to redo-if* commands entirely or to let them check whether they are executed in a running redo chain, e.g. by existence of certain environment variables, and ignore any options and treat them as targets.
In my understanding, the contract always was: Any target name is allowed unless it contains a newline character. So this includes targets that look like command line options. And it is certainly helpful when building general toolchains with redo, when the primary internal commands redo-if* allow for maximum freedom in their arguments.
Kind regards,
–Michael
next reply other threads:[~2023-10-01 12:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 12:15 goredo [this message]
2023-10-07 15:54 ` Arguments to redo-if* Sergey Matveev