All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: git@vger.kernel.org,  Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] CodingGuidelines: document test balloons in flight
Date: Thu, 24 Jul 2025 09:23:46 -0700	[thread overview]
Message-ID: <xmqqseilimlp.fsf@gitster.g> (raw)
In-Reply-To: <f954683b-b0be-4608-814d-23993316fcc2@gmail.com> (Phillip Wood's message of "Thu, 24 Jul 2025 15:26:33 +0100")

Phillip Wood <phillip.wood123@gmail.com> writes:

> Hi Junio
>
> On 23/07/2025 20:31, Junio C Hamano wrote:
>> Due to portability concerns, we do not blindly say "It is in [[this
>> standard]], so we will make liberal use of it" for many features,
>> and use of C99 language features follow this same principle.  When
>> we contemplate adopting a language feature that we haven't used in
>> our codebase, we typically first raise a test balloon, which
>>   - is a piece of code that exercises the language feature we are
>>     trying to see if it is OK to adopt
>>   - is in a small section of code that we know everybody who cares
>>     about having a working Git must be compiling
>>   - is in a fairly stable part of the code, to allow reverting it
>>     easily if some platforms do not understand it yet.
>> After a few years, with no breakage report from the community, we'd
>> declare that the feature is now safe to use in our codebase.  Before
>> that, we forbid the use of the language construct except for the
>> designated test balloon code site.
>> The CodingGuidelines document lists these selected features that we
>> already have determined that they are safe, and also those features
>> that we know some platforms had trouble with.
>> Let's also start listing ongoing test balloons and expected timeline
>> for adoption.
>> Helped-by: Phillip Wood <phillip.wood@dunelm.org.uk>
>
> I'm not sure what I've done to deserve that - it was Patrick that
> pointed out the test balloon already existed. The patch and the commit
> message look good to me.

Let me assign equal credit to Patrick.  Thanks.

>> Signed-off-by: Junio C Hamano <gitster@pobox.com>
>> ---
>>   Documentation/CodingGuidelines | 8 ++++++++
>>   1 file changed, 8 insertions(+)
>> diff --git a/Documentation/CodingGuidelines
>> b/Documentation/CodingGuidelines
>> index c1046abfb7..0776d15a95 100644
>> --- a/Documentation/CodingGuidelines
>> +++ b/Documentation/CodingGuidelines
>> @@ -298,6 +298,14 @@ For C programs:
>>      . since late 2021 with 44ba10d6, we have had variables declared in
>>        the for loop "for (int i = 0; i < 10; i++)".
>>   +   C99 features we have test balloons for:
>> +
>> +   . since late 2024 with v2.48.0-rc0~20, we have test balloons for
>> +     compound literal syntax, e.g., (struct foo){ .member = value };
>> +     our hope is that no platforms we care about have trouble using
>> +     them, and officially adopt its wider use in mid 2026.  Do not add
>> +     more use of the syntax until that happens.
>> +
>>      New C99 features that we cannot use yet:
>>        . %z and %zu as a printf() argument for a size_t (the %z
>> being for

  reply	other threads:[~2025-07-24 16:23 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-14 13:27 [PATCH] strbuf: add compound literal test balloon Phillip Wood
2025-07-14 14:26 ` Junio C Hamano
2025-07-15  8:53   ` Patrick Steinhardt
2025-07-15  9:44     ` Phillip Wood
2025-07-15 16:24     ` Junio C Hamano
2025-07-16 14:29       ` Phillip Wood
2025-07-23 18:01         ` Junio C Hamano
2025-07-23 19:31           ` [PATCH] CodingGuidelines: document test balloons in flight Junio C Hamano
2025-07-24  6:55             ` Patrick Steinhardt
2025-07-24 16:39               ` Junio C Hamano
2025-07-24 16:55                 ` Collin Funk
2025-07-26 23:15                   ` Junio C Hamano
2025-07-24 14:26             ` Phillip Wood
2025-07-24 16:23               ` Junio C Hamano [this message]
2025-07-16 14:32   ` [PATCH] strbuf: add compound literal test balloon Phillip Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqseilimlp.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=phillip.wood123@gmail.com \
    --cc=ps@pks.im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.