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

Re: [PATCH 5/7] Makefile: add 'check-sort' target

From
Jeff King <peff@peff.net>
Date
Mar 17, 2021, 22:01 UTC
Message-ID
<YFJ8KpseGSJdd3Am@coredump.intra.peff.net>
In-Reply-To
<CAPig+cRk-fCLFtug47w3trYQFiPzZ3bD4g11Qu4fTd3Fh6_bCQ@mail.gmail.com>
On Wed, Mar 17, 2021 at 05:48:18PM -0400, Eric Sunshine wrote:
Show 13 quoted lines
> On Wed, Mar 17, 2021 at 1:34 PM Jeff King <peff@peff.net> wrote:
> > TBH, I'm a little on the fence on whether automatically checking this is
> > even worth the hassle. Doing the make function above was a fun
> > diversion, but already I think this discussion has taken more time than
> > people actually spend resolving conflicts on unsorted Makefile lists.
> 
> I had the same reaction. Like you, I jumped in for the fun diversion.
> It allowed me to flex my Perl muscle a bit which has atrophied, but an
> out-of-order item here and there is such a minor concern, especially
> since they don't impact correctness, that I worry that such a CI job
> would be more hassle than it's worth. Making the feedback loop
> tighter, as discussed elsewhere in this thread, makes the idea of the
> automated check a bit more palatable.

There's an implication in what both of us said that I think is worth calling out explicitly: I would not feel the same about a problem that impacts the correctness of the resulting code. E.g., if the list of builtins were used with a binary search, then an unsorted list would produce the wrong result. And that would be worth testing.

It just seems that the stakes here are much lower.
-Peff
Previous: Eric SunshineNext: Junio C Hamano
Message 15 of 24 in “Sort lists and add static-analysis”
  1. 0/7 Sort lists and add static-analysisDenton Liu, Mar 16, 2021
  2. 3/7 builtin.h: ASCII-sort list of functionsDenton Liu, Mar 16, 2021
  3. Junio C HamanoMar 17, 2021
  4. 2/7 Makefile: ASCII-sort LIB_OBJSDenton Liu, Mar 16, 2021
  5. 1/7 Makefile: mark 'check-builtins' as a .PHONY targetDenton Liu, Mar 16, 2021
  6. Eric SunshineMar 16, 2021
  7. Junio C HamanoMar 17, 2021
  8. 5/7 Makefile: add 'check-sort' targetDenton Liu, Mar 16, 2021
  9. Eric SunshineMar 16, 2021
  10. Denton LiuMar 17, 2021
  11. Ævar Arnfjörð BjarmasonMar 17, 2021
  12. Jeff KingMar 17, 2021
  13. Ævar Arnfjörð BjarmasonMar 17, 2021
  14. Eric SunshineMar 17, 2021
  15. Jeff KingMar 17, 2021
  16. Junio C HamanoMar 17, 2021
  17. Ævar Arnfjörð BjarmasonMar 17, 2021
  18. Junio C HamanoMar 17, 2021
  19. 6/7 ci/run-static-analysis.sh: make check-builtinsDenton Liu, Mar 16, 2021
  20. 4/7 test-tool.h: ASCII-sort list of functionsDenton Liu, Mar 16, 2021
  21. Junio C HamanoMar 17, 2021
  22. 7/7 ci/run-static-analysis.sh: make check-sortDenton Liu, Mar 16, 2021
  23. Bagas SanjayaMar 17, 2021
  24. Junio C HamanoMar 17, 2021

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.