git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 1/1] Makefile: use `git ls-files` to list header files, if possible

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 5, 2019, 22:26 UTC
Message-ID
<xmqqlg1tt0uf.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.1903051627050.41@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 11 quoted lines
>> After a normal build, with dynamic dependency checking on, we would
>> have sufficient information to figure it out.  Would that help?
>
> Yes, *if* the dynamic dependency checking is in effect (read: if we are
> compiling with GCC).
>
> However, I think that one of the benefits of the current approach is that
> hdr-check finds issues also in headers that are *not* part of the current
> build. Read: once hdr-check is run as part of the CI build, it is harder
> for some random contributor to break hdr-check for somebody else with
> different compile time options.

Sure. That is exactly why we have multiple configurations at the CI, hopefully more than each individual contributor has at hand so that CI can give more coverage than any single individual can test.

What I was assuming was that at least one of these multiple configurations would cover the case where sha256/gcrypt.h truly is used, because that particular build is configured to use the system header and library. And it would be a far better approach to make that build check also for the header, if we can cover all the problematic (in the same sense as the sha256/gcrypt.h) header files, than unconditionally "checking" without knowing the prerequisite and causing a false positive.

Having said that, the optional use of ls-files introduced by the patch in question is a valid incremental improvement over the current Makefile, so it is a pretty much independent/orthogonal issue.

Previous: Johannes SchindelinNext: Jeff King
Message 20 of 31 in “Avoid calling find in the Makefile, if possible”
  1. 0/1 Avoid calling find in the Makefile, if possibleJohannes Schindelin via GitGitGadget, Mar 1, 2019
  2. 1/1 Makefile: use `git ls-files` to list header files, if possibleJohannes Schindelin via GitGitGadget, Mar 1, 2019
  3. Jeff KingMar 1, 2019
  4. Jeff KingMar 1, 2019
  5. Jeff KingMar 1, 2019
  6. Johannes SchindelinMar 2, 2019
  7. Jeff KingMar 3, 2019
  8. Johannes SchindelinMar 2, 2019
  9. Jeff KingMar 3, 2019
  10. Johannes SchindelinMar 2, 2019
  11. Jeff KingMar 3, 2019
  12. Ramsay JonesMar 3, 2019
  13. Johannes SchindelinMar 4, 2019
  14. Ramsay JonesMar 4, 2019
  15. Jeff KingMar 4, 2019
  16. Johannes SchindelinMar 4, 2019
  17. Jeff KingMar 4, 2019
  18. Junio C HamanoMar 5, 2019
  19. Johannes SchindelinMar 5, 2019
  20. Junio C HamanoMar 5, 2019
  21. Jeff KingMar 5, 2019
  22. Ramsay JonesMar 6, 2019
  23. Jeff KingMar 6, 2019
  24. Junio C HamanoMar 6, 2019
  25. compat/bswap: add include header guardsJeff King, Mar 6, 2019
  26. Junio C HamanoMar 6, 2019
  27. 0/1 Avoid calling find in the Makefile, if possibleJohannes Schindelin via GitGitGadget, Mar 4, 2019
  28. 1/1 Makefile: use `git ls-files` to list header files, if possibleJohannes Schindelin via GitGitGadget, Mar 4, 2019
  29. Ramsay JonesMar 4, 2019
  30. Ramsay JonesMar 4, 2019
  31. Jeff KingMar 4, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.