Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-25 Thread Jacob Bachmeyer
John Cotton Ericson wrote: On 9/25/23 10:24, Zack Weinberg wrote: It is ultimately ldv's call, but Jacob's experiment is not good enough for me to approve. So I saw Jacob's research as not demonstrating using functions is *definitely* OK, but that has indicating it *might* be OK. Does

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-25 Thread Zack Weinberg
>> On Mon, Sep 25, 2023, at 10:57 AM, John Cotton Ericson wrote: >>> Sure. If they show up, we can definitely revert it. But what happens >>> if they *don't* show up? What do you think in that case? >>> >> How long are you prepared to stick to your position? How many angry >> e- mails are you prepa

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-25 Thread John Cotton Ericson
On 9/25/23 11:06, Zack Weinberg wrote: For clarity, I was talking about the overhead of _AS_DETECT_BETTER_SHELL, not the overhead of functions themselves. Great! It is unclear to me whether bourne-ish shells that were new in March 13 1992 that still didn't support shell functions, or whether

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-25 Thread Zack Weinberg
On Mon, Sep 25, 2023, at 10:57 AM, John Cotton Ericson wrote: > On 9/25/23 10:24, Zack Weinberg wrote: > >> It is ultimately ldv's call, but Jacob's experiment is not good >> enough for me to approve. >> > So I saw Jacob's research as not demonstrating using functions is > *definitely* OK, but that

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-25 Thread John Cotton Ericson
On 9/25/23 10:24, Zack Weinberg wrote: It is ultimately ldv's call, but Jacob's experiment is not good enough for me to approve. So I saw Jacob's research as not demonstrating using functions is *definitely* OK, but that has indicating it *might* be OK. Does that sound better? The thing i

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-25 Thread Zack Weinberg
On Fri, Sep 22, 2023, at 5:14 PM, John Cotton Ericson wrote: > On 9/21/23 22:31, Jacob Bachmeyer wrote: >> Zack Weinberg wrote: >>> >>> Um. I don't think you can use shell functions in this file (or in >>> config.guess), for the same reason you can't use $(...). >> >> It may be worth noting that th

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-22 Thread John Cotton Ericson
On 9/21/23 22:31, Jacob Bachmeyer wrote: Zack Weinberg wrote: On Thu, Sep 21, 2023, at 3:52 PM, John Ericson wrote: ...  # Functions  ### +# Invalid configuration; display a message and exit +# +# Param 1: configuration +# Param 2: message +invalid_config () { +    echo "Invalid config

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-21 Thread Jacob Bachmeyer
Zack Weinberg wrote: On Thu, Sep 21, 2023, at 3:52 PM, John Ericson wrote: ... # Functions ### +# Invalid configuration; display a message and exit +# +# Param 1: configuration +# Param 2: message +invalid_config () { + echo "Invalid configuration '$1': $2" 1>&2 + exit

Re: [PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-21 Thread Zack Weinberg
On Thu, Sep 21, 2023, at 3:52 PM, John Ericson wrote: ... > # Functions > ### > > +# Invalid configuration; display a message and exit > +# > +# Param 1: configuration > +# Param 2: message > +invalid_config () { > + echo "Invalid configuration '$1': $2" 1>&2 > + exit 1 > +} Um.

[PATCH 2/3] config.sub: Factor out `invalid_config` function

2023-09-21 Thread John Ericson
There were indeed some cases we displayed the message but then forgot to exit! --- config.sub | 44 +--- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/config.sub b/config.sub index 79a960d..7d6c7be 100755 --- a/config.sub +++ b/config.sub @