From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Emily Shaffer <emilyshaffer@google.com>,
Ramsay Jones <ramsay@ramsayjones.plus.com>
Subject: Re: [PATCH] Makefile: drop GEN_HDRS
Date: Fri, 13 Dec 2019 19:38:20 -0500 [thread overview]
Message-ID: <20191214003820.GA927924@coredump.intra.peff.net> (raw)
In-Reply-To: <xmqq1rt7hkp6.fsf@gitster-ct.c.googlers.com>
On Fri, Dec 13, 2019 at 03:25:41PM -0800, Junio C Hamano wrote:
> Get rid of GEN_HDRS, which is used only once to list the headers we
> do not run hdr-check test on, and instead explicitly list that the
> ones, either tracked or generated, that we exempt from the test.
Yeah, I think this is an improvement by itself.
After reading this, though:
> - If we value the header cleanliness check, we eventually want to
> teach our header generating scripts to produce clean headers.
> Keeping the blanket "generated headers can be left as dirty as we
> want" exception does not nudge us in the right direction.
I did expect to see the actual hdr-check behavior move towards checking
these generated versions. However, both are kind of interesting.
unicode-width.h isn't a "real" header file; it's meant to be included in
the middle of a function. I think it _could_ be changed to define
"struct interval" itself, and then be a static file-scope variable. But
there's not really a compelling reason to do so.
But "command-list.h" is more of a traditional header file, being
included at the top of help.c. In theory the hdr-check target could add
a dependency on it, and then we could check it along with everything
else. But even without that first step, if I remove it from EXCEPT_HDRS,
nothing happens!
That's because LIB_H is created by running find in the local filesystem.
So until it's generated, we don't realize it's there to check. I kind of
wonder if it should be part of LIB_H. I suspect that on some systems,
we'd fail to notice a rebuild when command-list.txt is updated (but
nobody noticed, because it is only systems that do not have
compiler-supported dependency tracking, and most developers are no
modern platforms that do).
-Peff
next prev parent reply other threads:[~2019-12-14 0:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-13 23:25 [PATCH] Makefile: drop GEN_HDRS Junio C Hamano
2019-12-14 0:38 ` Jeff King [this message]
2019-12-14 1:00 ` Jeff King
2019-12-16 18:55 ` Junio C Hamano
2019-12-16 19:20 ` Jeff King
2019-12-17 1:27 ` Emily Shaffer
2019-12-17 1:40 ` Jonathan Nieder
2019-12-17 5:22 ` Jeff King
2019-12-17 1:43 ` Jonathan Nieder
2019-12-17 5:28 ` Jeff King
2019-12-17 11:35 ` vcxproj target, was " Johannes Schindelin
2019-12-19 4:51 ` Jeff King
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=20191214003820.GA927924@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=emilyshaffer@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ramsay@ramsayjones.plus.com \
/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).