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

Re: [PATCH] Makefile: ASCII-sort += lists

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 9, 2020, 16:12 UTC
Message-ID
<xmqqy2kftm36.fsf@gitster.c.googlers.com>
In-Reply-To
<nycvar.QRO.7.76.6.2010091250200.50@tvgsbejvaqbjf.bet>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 14 quoted lines
>> > -BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE)
>> >  BASIC_CFLAGS += -fno-omit-frame-pointer
>> > +BASIC_CFLAGS += -fsanitize=$(SANITIZE) -fno-sanitize-recover=$(SANITIZE)
>> >  ifneq ($(filter undefined,$(SANITIZERS)),)
>> >  BASIC_CFLAGS += -DSHA1DC_FORCE_ALIGNED_ACCESS
>> >  endif
>> > -- snap --
>>
>> I opted to exclude this hunk because it didn't seem like a list that
>> should be sorted. Perhaps if we include this in the static-analysis
>> script, we could define a whitelist of lists that we want to keep
>> sorted?
>
> I agree, modulo s/whitelist/allow list/.

If we were to do this, I agree that explicitly enumerating "lists whose elements must be sorted" would be a much better approach than declaring that our lists by default must be sorted and have a list of "lists whose elements are sorted in an order that has meaning, not just by codepoints".

But I somehow find the use of allow-list (as a concept [*1*]) awkward in this context. Technically, a list of things whose sortedness we care about may be "allowed to be automatically modified", and the remainder would be "forbidden from getting touched". But both are quite awkward way to think about them.

It would become even more awkward if the list is going to be used in a make target whose name has "check" in it, in which case the target would only point out problem so that the user can fix, and at that point, the said list would become a list of things that are "allowed to be checked".

[Footnote]
*1* ... not the phrase---I do not care in what color the allowed
    things are painted.
Previous: Johannes SchindelinNext: Jeff King
Message 7 of 9 in “Makefile: ASCII-sort += lists”
  1. Makefile: ASCII-sort += listsDenton Liu, Oct 8, 2020
  2. Johannes SchindelinOct 8, 2020
  3. Jeff KingOct 8, 2020
  4. Johannes SchindelinOct 9, 2020
  5. Denton LiuOct 9, 2020
  6. Johannes SchindelinOct 9, 2020
  7. Junio C HamanoOct 9, 2020
  8. Jeff KingOct 8, 2020
  9. Junio C HamanoOct 8, 2020

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.