From: Jeff King <peff@peff.net>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: Patrick Steinhardt <ps@pks.im>,
Bagas Sanjaya <bagasdotme@gmail.com>,
Git Mailing List <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: clar unit testing framework FTBFS on uclibc systems (wchar_t unsupported)
Date: Fri, 18 Oct 2024 00:51:55 -0400 [thread overview]
Message-ID: <20241018045155.GC2408674@coredump.intra.peff.net> (raw)
In-Reply-To: <ZxGN9zzt55GcL4Qj@tapette.crustytoothpaste.net>
On Thu, Oct 17, 2024 at 10:21:43PM +0000, brian m. carlson wrote:
> > We unconditionally include <wchar.h>, and your system does not seem to
> > have support for it built in. So why doesn't the `#error` trigger? It's
> > also not like this is a recent error, it has been added with 581deed72
> > (The obligatory forgotten files..., 2002-05-06).
> >
> > We can do something like the below patch in clar, but I'd first like to
> > understand why your platform seems to be broken in such a way.
>
> Yeah, this is definitely broken. We require ISO C99, and according to
> the draft preceding the ratification[0], `wchar.h` and its contents are not
> optional. The similar draft for C11 also doesn't appear to make these
> optional.
>
> I think users of uclibc will need to compile it with full ISO C99
> support. I expect that a wide variety of other software will be
> similarly broken without that.
Perhaps, but...don't the current releases of Git work just fine on such
a wchar-less uclibc system now? We don't use wchar or include wchar.h
ourselves, except on Windows or via compat/regex (though it is even
conditional there). This is a new portability problem introduced by the
clar test harness. And even there I doubt it is something we care about
(it looks like it's for allowing "%ls" in assertions).
Our approach to portability has traditionally been a cost/benefit for
individual features. Standards are a nice guideline, but the real world
does not always follow them. Sometimes accommodating platforms that
don't strictly follow the standard is cheap enough that it's worth
doing.
I think more recent discussions have trended to looking at standards in
a bit stronger way: giving minimum requirements and sticking to them.
Certainly I'm sympathetic to that viewpoint, as it can reduce noise.
But IMHO this is a good example of where the flexibility of the first
approach shines. We could accommodate this platform without any real
cost (and indeed, we should be able to _drop_ some clar code).
-Peff
next prev parent reply other threads:[~2024-10-18 4:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-17 3:51 clar unit testing framework FTBFS on uclibc systems (wchar_t unsupported) Bagas Sanjaya
2024-10-17 13:33 ` Patrick Steinhardt
2024-10-17 13:54 ` Patrick Steinhardt
2024-10-17 20:08 ` Taylor Blau
2024-10-17 22:21 ` brian m. carlson
2024-10-18 4:51 ` Jeff King [this message]
2024-10-18 4:59 ` Patrick Steinhardt
2024-10-18 5:24 ` Jeff King
2024-10-18 5:31 ` Patrick Steinhardt
2024-10-18 20:50 ` Taylor Blau
2024-10-21 6:44 ` Patrick Steinhardt
2024-10-21 19:30 ` Jeff King
2024-10-21 19:41 ` Taylor Blau
2024-10-18 20:07 ` brian m. carlson
2024-10-21 19:19 ` Jeff King
2024-10-21 19:31 ` Jeff King
2024-10-18 13:49 ` Bagas Sanjaya
2024-10-21 6:44 ` Patrick Steinhardt
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=20241018045155.GC2408674@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
--cc=sandals@crustytoothpaste.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).