Re: meson and tmp_install

From: Nikita Malakhov <hukutoc(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: meson and tmp_install
Date: 2022-12-20 18:11:26
Message-ID: CAN-LCVOi1j5-EoH=SUuQazTytDkL_eO5dyryKDQy2qo-YY1BaA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Didn't know where to ask, so I've chosen this thread - there is no any
documentation on meson build platform in PostgreSQL docs. Is this
okay? For me it was a surprise when the meson platform was added,
and I have had to spend some time sweeping through meson docs
when I'd added new source files, to build Postgres successfully.

Thanks!

On Tue, Dec 20, 2022 at 8:30 PM Andres Freund <andres(at)anarazel(dot)de> wrote:

> Hi,
>
> On 2022-12-20 07:12:04 -0500, Andrew Dunstan wrote:
> > Yesterday when testing a patch I got annoyed when my test failed. I
> > tested it like this:
> >
> > meson test ldap_password_func/001_mutated_bindpasswd
> >
> > It turned out that I needed to do this:
> >
> > meson test tmp_install ldap_password_func/001_mutated_bindpasswd
> >
> > The Makefile equivalent ensures that you have a tmp_install without
> > having to request to explicitly. It would be nice if we could make meson
> > do the same thing, and also honor NO_TEMP_INSTALL if set.
>
> I would like that too, but there's no easy fix that doesn't have
> downsides as far as I am aware. We could make the temp install a build
> target that the tests depend on, but for historical reasons in meson
> that means that the 'all' target depends on temp-install. Which isn't
> great.
>
> My current thinking is that we should get away from needing the
> temporary install and instead allow to run the tests against the build
> directory itself. The temp-install adds a fair bit of overhead and
> failure potential. The only reason we need it is that a) initdb and a
> few other programs insist that postgres needs to be in the same
> directory b) contrib modules currently need to reside in one single
> directory.
>
> Greetings,
>
> Andres Freund
>
>
>

--
Regards,
Nikita Malakhov
Postgres Professional
https://postgrespro.ru/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-12-20 18:22:33 Re: meson and tmp_install
Previous Message Andres Freund 2022-12-20 18:11:08 Re: Checksum errors in pg_stat_database