Re: automatically generating node support functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: automatically generating node support functions
Date
Msg-id 1229446.1657569262@sss.pgh.pa.us
Whole thread Raw
In response to Re: automatically generating node support functions  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: automatically generating node support functions
Re: automatically generating node support functions
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jul 11, 2022 at 1:57 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> More generally, I'm having second thoughts about the wisdom of
>> auto-generating the NodeTag enum at all.  With the current setup,
>> I am absolutely petrified about the risk of silent ABI breakage
>> thanks to the enum order changing.

> I think this is a valid concern, but having it be automatically
> generated is awfully handy, so I think it would be nice to find some
> way of preserving that.

Agreed.  The fundamental problem seems to be that each build toolchain
has its own source of truth about the file processing order, but we now
see that there had better be only one.  We could make the sole source
of truth about that be gen_node_support.pl itself, I think.

We can't simply move the file list into gen_node_support.pl, because
(a) the build system has to know about the dependencies involved, and
(b) gen_node_support.pl wouldn't know what to do in VPATH situations.
However, we could have gen_node_support.pl contain a canonical list
of the files it expects to be handed, and make it bitch if its
arguments don't match that.

That's ugly I admit, but the set of files of interest doesn't change
so often that maintaining one additional copy would be a big problem.

Anybody got a better idea?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: annoyance with .git-blame-ignore-revs
Next
From: Jeff Davis
Date:
Subject: Re: [PATCH] New [relation] option engine