Re: pgsql: Move gramparse.h to src/backend/parser

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Move gramparse.h to src/backend/parser
Date: 2022-09-14 20:57:15
Message-ID: 20220914205715.xbmuqox5htobzggy@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Hi,

On 2022-09-14 15:37:06 -0400, Tom Lane wrote:
> John Naylor <john(dot)naylor(at)postgresql(dot)org> writes:
> > Move gramparse.h to src/backend/parser
>
> The cfbot is unhappy since this commit; some but not all tests fail with
>
> [09:33:13.793] In file included from scan.c:39:
> [09:33:13.793] ./gramparse.h:29:10: fatal error: 'gram.h' file not found
> [09:33:13.794] #include "gram.h"
> [09:33:13.794] ^~~~~~~~
> [09:33:13.839] In file included from parser.c:25:
> [09:33:13.839] ./gramparse.h:29:10: fatal error: 'gram.h' file not found
> [09:33:13.839] #include "gram.h"
> [09:33:13.839] ^~~~~~~~
>
> What I think is happening is that it was a mistake to remove
> parser/gram.h from the dependencies of backend/Makefile's
> generated-headers target: that allows builds to proceed before
> gram.h has necessarily been created. The fact that it works
> at all for anybody says that there's another dependency path
> somewhere that causes bison to get run ... but, seemingly,
> that doesn't always happen soon enough in a parallel build.

But why doesn't the below take care of it?

> # Force these dependencies to be known even without dependency info built:
> gram.o scan.o parser.o: gram.h

The only file including gram.h is gramparse.h, which in turn is only included
by parser.c, scan.l, gram.y. So this should suffice.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2022-09-14 20:57:19 pgsql: Small wording improvements
Previous Message Peter Geoghegan 2022-09-14 20:54:53 Re: pgsql: Add VACUUM instrumentation for scanned pages, relfrozenxid.