Re: meson: Non-feature feature options

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: meson: Non-feature feature options
Date: 2023-02-21 16:32:10
Message-ID: CAN55FZ2Bz5P_sd2+1KBwWa9v4vDByM2UX7rKfzQs7yj6buojsg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Mon, 20 Feb 2023 at 22:42, Andres Freund <andres(at)anarazel(dot)de> wrote:
> On 2023-02-20 19:53:53 +0100, Peter Eisentraut wrote:
> > On 20.02.23 13:33, Nazir Bilal Yavuz wrote:
> > > I added SSL and UUID patches. UUID patch has two different fixes:
> > >
> > > 1 - v1-0002-meson-Refactor-UUID-option.patch: Adding 'auto' choice to
> > > 'uuid' combo option.
> > >
> > > 2 - v1-0002-meson-Refactor-UUID-option-with-uuid_library.patch: Making
> > > 'uuid' feature option and adding new 'uuid_library' combo option with
> > > ['auto', 'bsd', 'e2fs', 'ossp'] choices. If 'uuid_library' is set other
> > > than 'auto' and it can't be found, build throws an error.
> > >
> > > What do you think?
> >
> > I like the second approach, with a 'uuid' feature option. As you wrote
> > earlier, adding an 'auto' choice to a combo option doesn't work fully like a
> > real feature option.
>
> But we can make it behave exactly like one, by checking the auto_features
> option.

Yes, we can set it like `uuidopt = get_option('auto_features')`.
However, if someone wants to set 'auto_features' to 'disabled' but
'uuid' to 'enabled'(to find at least one working uuid library); this
won't be possible. We can add 'enabled', 'disabled and 'auto' choices
to 'uuid' combo option to make all behaviours possible but adding
'uuid' feature option and 'uuid_library' combo option seems better to
me.

Regards,
Nazir Bilal Yavuz
Microsoft

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2023-02-21 16:32:49 Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error
Previous Message Heikki Linnakangas 2023-02-21 16:18:02 Re: refactoring relation extension and BufferAlloc(), faster COPY