From: Tristan Partin <tristan@neon.tech>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
To: Andres Freund <andres@anarazel.de>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] Missing dep on Catalog.pm in meson rules
Date: Fri, 16 Jun 2023 17:11:59 -0500
Message-ID: <CTEF43AJU71G.28X93MFZFT4BI@gonk> (raw)
In-Reply-To: <871qibrrcd.fsf@wibble.ilmari.org>
References: <CT1MJFE3PEEV.2S08CXLDYMCWP@gonk>
<329a690c-1f4e-4759-8018-8ee562c159f0@app.fastmail.com>
<CT1V90ZD4ZPZ.2J5QU7ZEYSB60@gonk>
<20230602130028.yf4jagpqqmivhx77@alap3.anarazel.de>
<CT26U28ECWTA.3VIVYB9J55L4K@gonk>
<20230602134704.w2gg7nwe2jisd7es@alap3.anarazel.de>
<CT29G866OR1A.P5MR0P1UF545@gonk>
<20230609184354.5stlrg7vfj6dd7rz@awork3.anarazel.de>
<20230614193213.74elqlrhb24i4ouq@awork3.anarazel.de>
<52d98dc8-8107-7f42-5793-3a3eac30ecfa@dunslane.net>
<20230616211628.3wxxt2cisexqrakq@awork3.anarazel.de>
<871qibrrcd.fsf@wibble.ilmari.org>
On Fri Jun 16, 2023 at 5:10 PM CDT, Dagfinn Ilmari Mannsåker wrote:
> Andres Freund <andres@anarazel.de> writes:
>
> > Hi,
> >
> > On 2023-06-16 16:20:14 -0400, Andrew Dunstan wrote:
> >> Unless I'm misunderstanding, this doesn't look terribly feasible to me. You
> >> can only get at %INC by loading the module, which in many cases will have
> >> side effects.
> >
> > I was envisioning using %INC after the use/require block - I don't think our
> > scripts load additional modules after that point?
>
> I was thinking of a module for writing depfile entries that would append
> `values %INC` to the list of source files for each target specified by
> the script.
>
> >> And then you would also need to filter out things loaded that
> >> are not our artefacts (e.g. Catalog.pm loads File::Compare).
> >
> > I don't think we would need to filter the output. This would just be for a
> > build dependency file. I don't see a problem with rerunning genbki.pl et al after
> > somebody updates File::Compare?
>
> As long as mason doesn't object to dep files outside the source tree.
> Otherwise, and option would be to pass in @SOURCE_ROOT@ and only include
> `grep /^\Q$source_root\E\b/, values %INC` in the depfile.
Meson has no such restrictions.
--
Tristan Partin
Neon (https://neon.tech)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tristan@neon.tech, ilmari@ilmari.org, andres@anarazel.de, andrew@dunslane.net
Subject: Re: [PATCH] Missing dep on Catalog.pm in meson rules
In-Reply-To: <CTEF43AJU71G.28X93MFZFT4BI@gonk>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox