build remaining Flex files standalone

2022-08-11 Thread John Naylor
Starting a new thread to control clutter. [was: Re: [RFC] building postgres with meson] motivation: https://www.postgresql.org/message-id/20220810171935.7k5zgnjwqzalzmtm%40awork3.anarazel.de On Thu, Aug 11, 2022 at 11:07 AM Andres Freund wrote: > I think we should consider compiling it separate

Re: build remaining Flex files standalone

2022-08-13 Thread John Naylor
Here are the rest. Most of it was pretty straightforward, with the main exception of jsonpath_scan.c, which is not quite finished. That one passes tests but still has one compiler warning. I'm unsure how much of what is there already is really necessary or was cargo-culted from elsewhere without ex

Re: build remaining Flex files standalone

2022-08-15 Thread Andres Freund
Hi, Thanks for your work on this! On 2022-08-13 15:39:06 +0700, John Naylor wrote: > Here are the rest. Most of it was pretty straightforward, with the > main exception of jsonpath_scan.c, which is not quite finished. That > one passes tests but still has one compiler warning. I'm unsure how > mu

Re: build remaining Flex files standalone

2022-08-16 Thread John Naylor
For v3, I addressed some comments and added .h files to the headerscheck exceptions. On Tue, Aug 16, 2022 at 1:11 AM Andres Freund wrote: > On 2022-08-13 15:39:06 +0700, John Naylor wrote: > > Here are the rest. Most of it was pretty straightforward, with the > > main exception of jsonpath_scan.

Re: build remaining Flex files standalone

2022-08-16 Thread Andres Freund
Hi, On 2022-08-16 17:41:43 +0700, John Naylor wrote: > For v3, I addressed some comments and added .h files to the > headerscheck exceptions. Thanks! > /* > * NB: include bootparse.h only AFTER including bootstrap.h, because > bootstrap.h > * includes node definitions needed for YYSTYPE. >

Re: build remaining Flex files standalone

2022-08-16 Thread Tom Lane
Andres Freund writes: > On 2022-08-16 17:41:43 +0700, John Naylor wrote: >> That directive has been supported in Bison since 2.4.2. > 2.4.2 is from 2010. So I think we could just start relying on it? Apple is still shipping 2.3. Is this worth enough to make Mac users install a non-default Bison

Re: build remaining Flex files standalone

2022-08-16 Thread John Naylor
On Wed, Aug 17, 2022 at 8:14 AM Andres Freund wrote: > > > > +/* functions shared between guc.c and guc-file.l */ > > > > [...] > > > I think I prefer your suggestion of a guc_internal.h upthread. > > > > Started in 0002, but left open the headerscheck failure. > > > > Also, if such a thing is me

Re: build remaining Flex files standalone

2022-08-18 Thread John Naylor
On Wed, Aug 17, 2022 at 8:14 AM Andres Freund wrote: > > Hi, > > On 2022-08-16 17:41:43 +0700, John Naylor wrote: > > For v3, I addressed some comments and added .h files to the > > headerscheck exceptions. > > Thanks! > > > > /* > > * NB: include bootparse.h only AFTER including bootstrap.h, bec

Re: build remaining Flex files standalone

2022-08-18 Thread John Naylor
> > > > > index dbe7d4f742..0b373048b5 100644 > > > > > --- a/contrib/cube/cubedata.h > > > > > +++ b/contrib/cube/cubedata.h > > > > > @@ -67,3 +67,7 @@ extern void cube_scanner_finish(void); > > > > > > > > > > /* in cubeparse.y */ > > > > > extern int cube_yyparse(NDBOX **result); > > > > >

Re: build remaining Flex files standalone

2022-08-18 Thread John Naylor
I wrote > [v4] This piece is a leftover from the last version, and forgot to remove it, will fix: diff --git a/contrib/cube/cubeparse.y b/contrib/cube/cubeparse.y index 7577c4515c..e3b750b695 100644 --- a/contrib/cube/cubeparse.y +++ b/contrib/cube/cubeparse.y @@ -7,6 +7,7 @@ #include "postgres.

Re: build remaining Flex files standalone

2022-09-02 Thread Andres Freund
Hi John, Are you planning to press ahead with these? > Subject: [PATCH v4 01/11] Preparatory refactoring for compiling guc-file.c > standalone > Subject: [PATCH v4 02/11] Move private declarations shared between guc.c and > guc-file.l to new header > Subject: [PATCH v4 03/11] Build guc-file.c

Re: build remaining Flex files standalone

2022-09-02 Thread John Naylor
On Sat, Sep 3, 2022 at 1:29 AM Andres Freund wrote: > > Hi John, > > Are you planning to press ahead with these? I was waiting for feedback on the latest set, so tomorrow I'll see about the FIXME and remove the leftover bogus include. I was thinking of applying the guc-file patches separately and

Re: build remaining Flex files standalone

2022-09-03 Thread John Naylor
On Sat, Sep 3, 2022 at 1:29 AM Andres Freund wrote: > > Subject: [PATCH v4 01/11] Preparatory refactoring for compiling guc-file.c > > standalone > > Subject: [PATCH v4 02/11] Move private declarations shared between guc.c and > > guc-file.l to new header > > Subject: [PATCH v4 03/11] Build guc

Re: build remaining Flex files standalone

2022-09-04 Thread Andres Freund
Hi, On 2022-09-04 12:16:10 +0700, John Naylor wrote: > Pushed 01 and 02 separately, then squashed and pushed the rest. Thanks a lot! It does look a good bit cleaner to me now. I think, as a followup improvement, we should move gramparse.h to src/backend/parser, and stop installing gram.h, grampa

Re: build remaining Flex files standalone

2022-09-06 Thread John Naylor
On Mon, Sep 5, 2022 at 1:18 AM Andres Freund wrote: > > Hi, > > On 2022-09-04 12:16:10 +0700, John Naylor wrote: > > Pushed 01 and 02 separately, then squashed and pushed the rest. > > Thanks a lot! It does look a good bit cleaner to me now. > > I think, as a followup improvement, we should move g

Re: build remaining Flex files standalone

2022-09-07 Thread Peter Eisentraut
On 04.09.22 20:17, Andres Freund wrote: I think, as a followup improvement, we should move gramparse.h to src/backend/parser, and stop installing gram.h, gramparse.h. gramparse.h already had this note: * NOTE: this file is only meant to be included in the core parsing files, * i.e., parser.c

Re: build remaining Flex files standalone

2022-09-08 Thread John Naylor
On Wed, Sep 7, 2022 at 4:27 PM Peter Eisentraut wrote: > > On 04.09.22 20:17, Andres Freund wrote: > > I think, as a followup improvement, we should move gramparse.h to > > src/backend/parser, and stop installing gram.h, gramparse.h. gramparse.h > > already had this note: > > > > * NOTE: this fi

Re: build remaining Flex files standalone

2022-09-12 Thread John Naylor
On Fri, Sep 9, 2022 at 12:18 PM John Naylor wrote: > > It seems gramparse.h isn't installed now? In any case, here's a patch > to move gramparse to the backend dir and stop symlinking/ installing > gram.h. Looking more closely at src/include/Makefile, this is incorrect -- all files in SUBDIRS are

Re: build remaining Flex files standalone

2022-09-13 Thread Andres Freund
On 2022-09-12 14:49:50 +0700, John Naylor wrote: > CI builds fine. For v2 I only adjusted the commit message. I'll push > in a couple days unless there are objections. Makes sense to me. Thanks for working on it!

Re: build remaining Flex files standalone

2022-09-13 Thread John Naylor
On Wed, Sep 14, 2022 at 6:10 AM Andres Freund wrote: > > On 2022-09-12 14:49:50 +0700, John Naylor wrote: > > CI builds fine. For v2 I only adjusted the commit message. I'll push > > in a couple days unless there are objections. > > Makes sense to me. Thanks for working on it! This is done. --