From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>,
git@vger.kernel.org, "Glen Choo" <chooglen@google.com>,
"Taylor Blau" <me@ttaylorr.com>,
"Elijah Newren" <newren@gmail.com>,
"Junio C Hamano" <junio@pobox.com>
Subject: Re: [PATCH] cocci: remove 'unused.cocci'
Date: Mon, 01 May 2023 19:28:50 +0200 [thread overview]
Message-ID: <230501.865y9chs69.gmgdl@evledraar.gmail.com> (raw)
In-Reply-To: <xmqqlei86o7s.fsf@gitster.g>
On Mon, May 01 2023, Junio C Hamano wrote:
> Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
>
>> It wasn't something I intended at the time, but arguably the main use of
>> this rule since it was added was that it served as a canary for the tree
>> becoming completely broken with coccinelle, due to adding C syntax it
>> didn't understand:
>> https://lore.kernel.org/git/220825.86ilmg4mil.gmgdl@evledraar.gmail.com/
>
> If it weren't Coccinelle, we could have used the much nicer looking
> UNUSED(var) notation, and the compilers were all fine.
>
> Only because Coccinelle did not understand the "cute" syntax trick,
> we couldn't. Yes, it caught us when we used a syntax it couldn't
> understand, but is that a good thing in the first place?
I think it's unambiguously a good thing that we spotted an otherwise
unknown side-effect of the proposed UNUSED(var) syntax on coccinelle.
We might also say that some bit of syntax that coccinelle doesn't
understand is so valuable that we'd like to make coccinelle itself
significantly less useful (as it wouldn't reach into those functions),
or stop using it altogether.
But that's a seperate question. I'm just pointing out that we'd be
losing a very valuable check on future syntax incompatibilities,
particularly when it comes to clever use of macros.
A better way to spot that would be to start parsing the coccinelle logs,
and detect when we have unknown parsing issues, and error on those. But
until then...
next prev parent reply other threads:[~2023-05-01 17:34 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 20:05 [PATCH 0/2] cocci: codify authoring and reviewing practices Glen Choo via GitGitGadget
2023-04-12 20:05 ` [PATCH 1/2] cocci: add headings to and reword README Glen Choo via GitGitGadget
2023-04-12 21:18 ` Junio C Hamano
2023-04-13 18:37 ` Glen Choo
2023-04-13 18:51 ` Junio C Hamano
2023-04-12 20:05 ` [PATCH 2/2] cocci: codify authoring and reviewing practices Glen Choo via GitGitGadget
2023-04-16 7:42 ` SZEDER Gábor
2023-04-19 19:29 ` Glen Choo
2023-04-20 20:53 ` [PATCH] cocci: remove 'unused.cocci' SZEDER Gábor
2023-04-21 2:43 ` Junio C Hamano
2023-05-01 13:27 ` Ævar Arnfjörð Bjarmason
2023-05-01 15:55 ` Junio C Hamano
2023-05-01 17:28 ` Ævar Arnfjörð Bjarmason [this message]
2023-05-10 22:45 ` Junio C Hamano
2023-04-16 13:37 ` [PATCH 2/2] cocci: codify authoring and reviewing practices Ævar Arnfjörð Bjarmason
2023-04-19 22:30 ` Glen Choo
2023-04-15 1:27 ` [PATCH 0/2] " Elijah Newren
2023-04-17 16:21 ` Junio C Hamano
2023-04-27 22:22 ` [PATCH v2 " Glen Choo via GitGitGadget
2023-04-27 22:22 ` [PATCH v2 1/2] cocci: add headings to and reword README Glen Choo via GitGitGadget
2023-05-01 10:53 ` Ævar Arnfjörð Bjarmason
2023-05-01 15:06 ` Junio C Hamano
2023-05-02 19:29 ` Felipe Contreras
2023-05-02 19:30 ` Felipe Contreras
2023-05-09 17:54 ` Glen Choo
2023-04-27 22:22 ` [PATCH v2 2/2] cocci: codify authoring and reviewing practices Glen Choo via GitGitGadget
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=230501.865y9chs69.gmgdl@evledraar.gmail.com \
--to=avarab@gmail.com \
--cc=chooglen@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=junio@pobox.com \
--cc=me@ttaylorr.com \
--cc=newren@gmail.com \
--cc=szeder.dev@gmail.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).