Re: meson: Non-feature feature options - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: meson: Non-feature feature options
Date
Msg-id b695b531-eb98-87f1-45c8-13f2ed3973a8@enterprisedb.com
Whole thread Raw
In response to Re: meson: Non-feature feature options  (Nazir Bilal Yavuz <byavuz81@gmail.com>)
Responses Re: meson: Non-feature feature options
List pgsql-hackers
On 24.02.23 14:01, Nazir Bilal Yavuz wrote:
> Thanks for the feedback. I updated the ssl patch and if you like
> changes, I can apply the same logic to uuid.

Maybe we can make some of the logic less nested.  Right now there is

     if sslopt != 'none'

       if not ssl.found() and sslopt in ['auto', 'openssl']

I think at that point, ssl.found() is never true, so it can be removed. 
And the two checks for sslopt are nearly redundant.

At the end of the block, there is

       # At least one SSL library must be found, otherwise throw an error
       if sslopt == 'auto' and auto_features.enabled()
         error('SSL Library could not be found')
       endif
     endif

which also implies sslopt != 'none'.  So I think the whole thing could be

     if sslopt in ['auto', 'openssl']

       ...

     endif

     if sslopt == 'auto' and auto_features.enabled()
       error('SSL Library could not be found')
     endif

both at the top level.

Another issue, I think this is incorrect:

+          openssl_required ? error('openssl function @0@ is 
required'.format(func)) : \
+                             message('openssl function @0@ is 
required'.format(func))

We don't want to issue a message like this when a non-required function 
is missing.



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Non-superuser subscription owners
Next
From: Tomas Vondra
Date:
Subject: Re: Add LZ4 compression in pg_dump