Re: [PATCH] Missing dep on Catalog.pm in meson rules

From: Andres Freund <andres(at)anarazel(dot)de>
To: Tristan Partin <tristan(at)neon(dot)tech>
Cc: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Missing dep on Catalog.pm in meson rules
Date: 2023-06-09 18:43:54
Message-ID: 20230609184354.5stlrg7vfj6dd7rz@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-06-02 10:13:44 -0500, Tristan Partin wrote:
> On Fri Jun 2, 2023 at 8:47 AM CDT, Andres Freund wrote:
> > Hi,
> >
> > On 2023-06-02 08:10:43 -0500, Tristan Partin wrote:
> > > > I wonder if we instead could just make perl output the files it loads and
> > > > handle dependencies automatically that way? But that's more work, so it's
> > > > probably the right thing to go for the manual path for now.
> > >
> > > I am not familar with Perl enough (at all haha) to know if that is
> > > possible. I don't know exactly what these Perl files do, but perhaps it
> > > might make sense to have some global lookup table that is setup near the
> > > beginning of the script.
> >
> > It'd be nice to have something more general - there are other perl modules we
> > load, e.g.
> > ./src/backend/catalog/Catalog.pm
> > ./src/backend/utils/mb/Unicode/convutils.pm
> > ./src/tools/PerfectHash.pm
> >
> >
> > > perl_files = {
> > > 'Catalog.pm': files('path/to/Catalog.pm'),
> > > ...
> > > }
> >
> > I think you got it, but just to make sure: I was thinking of generating a
> > depfile from within perl. Something like what you propose doesn't quite seems
> > like a sufficient improvement.
>
> Whatever I am proposing is definitely subpar to generating a depfile. So
> if that can be done, that is the best option!

I looked for a bit, but couldn't find an easy way to do so. I would still like
to pursue going towards dep files for the perl scripts, even if that requires
explicit support in the perl scripts, but that's a change for later.

> > > Otherwise, manual as it is in the original patch seems like an alright
> > > compromise for now.
> >
> > Yea. I'm working on a more complete version, also dealing with dependencies on
> > PerfectHash.pm.
>
> Good to hear. Happy to review any patches :).

Attached.

Greetings,

Andres Freund

Attachment Content-Type Size
v2-0001-meson-Add-dependencies-to-perl-modules-to-various.patch text/x-diff 7.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tristan Partin 2023-06-09 18:58:46 Re: [PATCH] Missing dep on Catalog.pm in meson rules
Previous Message Andres Freund 2023-06-09 18:36:03 Re: Meson build updates