Re: [PATCH v3 00/11] cocci: make "incremental" possible + a ccache-like tool
- From
Jeff King <peff@peff.net>
- Date
- Oct 17, 2022, 19:18 UTC
- Message-ID
- <Y02qgLP12p0c+XWB@coredump.intra.peff.net>
- In-Reply-To
- <221017.86czaqjnhy.gmgdl@evledraar.gmail.com>
On Mon, Oct 17, 2022 at 08:36:46PM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 9 quoted lines
> > Maybe we don't do any of the things that could trigger problems in our > > spatch rules. But it's not clear to me what we're risking. Do you have a > > link for further discussion? > > I think 10/11's commit message should answer your question: > https://lore.kernel.org/git/patch-v3-10.11-52177ea2a68-20221014T152553Z-avarab@gmail.com/ > > The tl;dr is that it's not safe in the general case, as noted in the > post you & the more recent one I linked to in 10/11.
Thanks. Holy cow, the coccinelle list is hard to use compared to lore/public-inbox. The direct link to the thread in question is:
https://sympa.inria.fr/sympa/arc/cocci/2022-09/msg00001.html
(you'll need to click a javascript button to see it, though).
Show 9 quoted lines
> So, with this series doing: > > perl -pi -e 's/swap/preincrement/g' contrib/coccinelle/swap.cocci > > Will error it if you run it with "SPATCH_CONCAT_COCCI=Y", but not with > "SPATCH_CONCAT_COCCI=", as the rule names conflict in the ALL.cocci. > > But as 10/11 notes we can just avoid this by not picking conflicting > names, which doesn't seem like an undue burden.
Yeah, that seems OK, then. In fact, I'd be fine with guidance in the README saying "don't bother with a name if you don't need it".
-Peff