From: Jeff King <peff@peff.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>,
git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/1] Makefile: use `git ls-files` to list header files, if possible
Date: Sun, 3 Mar 2019 12:19:51 -0500 [thread overview]
Message-ID: <20190303171951.GD23811@sigill.intra.peff.net> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1903022058230.45@tvgsbejvaqbjf.bet>
On Sat, Mar 02, 2019 at 09:05:24PM +0100, Johannes Schindelin wrote:
> > That seems reasonable (regardless of whether it is in a script or in the
> > Makefile). Another option is to use -maxdepth, but that involves
> > guessing how deep people might actually put header files.
>
> It would also fail to work when somebody clones an unrelated repository
> that contains header files in the top-level directory into the Git
> worktree. I know somebody like that: me.
Good point.
By the way, "make hdr-check" already fails for me on master, as I do not have
libgcrypt installed, and it unconditionally checks sha256/gcrypt.h.
I wonder if this actually does point to hdr-check needing to be smarter
about checking the headers that are actually used in compilation on your
platform. Or if that file should just be added to the set of excluded
headers.
> > We should be able to add back $(GENERATED_H) as appropriate. I see you
> > did it for the non-computed-dependencies case. Couldn't we do the same
> > for $(LOCALIZED_C) and $(CHK_HDRS)?
>
> As you figured out, CHK_HDRS *specifically* excludes the generated
> headers, and as I pointed out: LOCALIZED_C includes $(GENERATED_H)
> explicitly.
>
> So I think we're good on that front.
Yeah, agreed.
> > > Likewise, we no longer include not-yet-tracked header files in `LIB_H`.
> >
> > I think that's probably OK.
>
> It does potentially make developing new patches more challenging. I, for
> one, do not immediately stage every new file I add, especially not header
> files. But then, I rarely recompile after only editing such a new header
> file (I would more likely modify also the source file that includes that
> header).
>
> So while I think this issue could potentially cause problems only *very*
> rarely, I think that it would be a really terribly confusing thing if it
> happened.
>
> But I probably worry too much about it?
I think it's not ideal, but it's probably an acceptable tradeoff. The
LIB_H list is used for three things:
- hdr-check, which I'd think would generally be run periodically on a
full tree to catch any new header breakages. But I dunno, maybe
people want to run it as soon as they've written new code.
- the .po generation, which generally is a separate workflow from
writing new header files
- the header-dependency fallback code. This is definitely the place
where somebody just adding a new header file and running "make"
might get bitten. But it only kicks in for ancient, crappy compilers
that don't do dependency computation; so I think most developers
would not be using it. (this is your cue to explain to me how
some workflow involving MSVC does not compute dependencies, and
I'm unknowingly dismissing a large portion developers ;) ).
-Peff
next prev parent reply other threads:[~2019-03-03 17:19 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-01 19:57 [PATCH 0/1] Avoid calling find in the Makefile, if possible Johannes Schindelin via GitGitGadget
2019-03-01 19:57 ` [PATCH 1/1] Makefile: use `git ls-files` to list header files, " Johannes Schindelin via GitGitGadget
2019-03-01 21:36 ` Jeff King
2019-03-01 21:54 ` Jeff King
2019-03-01 22:01 ` Jeff King
2019-03-02 19:54 ` Johannes Schindelin
2019-03-03 17:08 ` Jeff King
2019-03-02 19:57 ` Johannes Schindelin
2019-03-03 17:11 ` Jeff King
2019-03-02 20:05 ` Johannes Schindelin
2019-03-03 17:19 ` Jeff King [this message]
2019-03-03 21:30 ` Ramsay Jones
2019-03-04 12:38 ` Johannes Schindelin
2019-03-04 20:31 ` Ramsay Jones
2019-03-04 21:37 ` Jeff King
2019-03-04 11:08 ` Johannes Schindelin
2019-03-04 21:41 ` Jeff King
2019-03-05 5:50 ` Junio C Hamano
2019-03-05 15:28 ` Johannes Schindelin
2019-03-05 22:26 ` Junio C Hamano
2019-03-05 23:07 ` Jeff King
2019-03-06 0:23 ` Ramsay Jones
2019-03-06 4:40 ` Jeff King
2019-03-06 5:28 ` Junio C Hamano
2019-03-06 19:05 ` [PATCH] compat/bswap: add include header guards Jeff King
2019-03-06 22:42 ` Junio C Hamano
2019-03-04 13:47 ` [PATCH v2 0/1] Avoid calling find in the Makefile, if possible Johannes Schindelin via GitGitGadget
2019-03-04 13:47 ` [PATCH v2 1/1] Makefile: use `git ls-files` to list header files, " Johannes Schindelin via GitGitGadget
2019-03-04 20:38 ` Ramsay Jones
2019-03-04 21:01 ` Ramsay Jones
2019-03-04 21:43 ` 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=20190303171951.GD23811@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=gitster@pobox.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).