All of lore.kernel.org
 help / color / mirror / Atom feed
From: Glen Choo <chooglen@google.com>
To: "SZEDER Gábor" <szeder.dev@gmail.com>,
	"Glen Choo via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, "Taylor Blau" <me@ttaylorr.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>,
	"Elijah Newren" <newren@gmail.com>
Subject: Re: [PATCH 2/2] cocci: codify authoring and reviewing practices
Date: Wed, 19 Apr 2023 12:29:32 -0700	[thread overview]
Message-ID: <kl6lzg731xib.fsf@chooglen-macbookpro.roam.corp.google.com> (raw)
In-Reply-To: <20230416074212.GB3271@szeder.dev>

SZEDER Gábor <szeder.dev@gmail.com> writes:

>> +* .cocci rules should target only the problem it is trying to solve; "collateral
>> +  damage" is not allowed.
>> +
>> +* .cocci files used for refactoring should be temporarily kept in-tree to aid
>
> How should such semantic patches be kept in-tree?
> As .pending.cocci?  Then I think it would be better to point this out
> here.  Or as a "regular" semantic patch?  Then I'm not sure I agree
> with this recommendation, but perhaps a commit message explaining the
> reasoning behind this would help me make up my mind :)

I don't feel strongly about this, but I was envisioning keeping them as
a "regular" patch, e.g. what Ævar proposed in:

  https://lore.kernel.org/git/230326.86ileow1fu.gmgdl@evledraar.gmail.com/

In theory, this means that a long running fork (that didn't get updated
during the initial refactor) can run coccicheck, notice the failure, and
then automatically fix themselves with the included semantic patch. In
practice, I don't know how many forks run coccicheck, or whether these
refactors are just easy enough to do by hand.

For refactors, I suspect that the impact on the 'make coccicheck'
runtime will be low, since we're typically targeting just a few tokens
and cocci can skip whatever files don't have those tokens, so keeping it
as a "regular" patch might be okay.

> It might also be worth mentioning that before submitting a new
> semantic patch developers should consider its cost-benefit ratio, in
> particular its effect on the runtime of 'make coccicheck',

Makes sense, though I'm not sure what practical advice to give in order
to evaluate the impact on runtime (besides just running it themselves).

> in the hope
> that we can avoid another 'unused.cocci' fiasco.

Maybe this is a good starting point for discussing cost-benefit
analysis. I'm not familiar with this fiasco, though. Was an early
version of 'unused.cocci' too broad, resulting in a massive hit to
runtime?

  reply	other threads:[~2023-04-19 19:29 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 [this message]
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
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=kl6lzg731xib.fsf@chooglen-macbookpro.roam.corp.google.com \
    --to=chooglen@google.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.