Hi,

Hi,

On 2025-06-18 10:58:22 +0200, Peter Eisentraut wrote:
> On 17.06.25 19:36, Peter Eisentraut wrote:
> > meson.build currently says
> > 
> > # We want < 0.56 for python 3.5 compatibility on old platforms. EPEL for
> > # RHEL 7 has 0.55. < 0.54 would require replacing some uses of the fs
> > # module, < 0.53 all uses of fs. So far there's no need to go to >=0.56.
> > meson_version: '>=0.54',
> > 
> > Since the current minimum supported Python version is now actually 3.6,
> > we could update this a bit.
> > 
> > The first Meson version to require Python 3.7 is 0.62, so we should stay
> > below that.
> > 
> > Moving to 0.55 and 0.56 would get rid of some future-deprecated warnings.
> > 
> > There is some conditional code for 0.57 and 0.59, so landing on either
> > of these would allow getting rid of some of that.
> > 
> > I see that Rocky Linux 8 ships with Meson 0.58.2 [0], so maybe that is a
> > good target to aim for.  (I don't know if that carried over from RHEL 8
> > or is their own doing.)  But there aren't any compelling features new in
> > 0.58 (format strings seem nice but are pretty much cosmetic), so maybe
> > setting the minimum to 0.57 is enough.
> 
> Ok, let's make a small start.  Here is a patch set that moves the
> requirement to >=0.57.  As explained above, this allows getting rid of a
> bunch of conditional code and the future-deprecated warnings.
> 
> There is one mention that I didn't dare touch:
> 
> if have_gssapi
>   # Meson before 0.57.0 did not support using check_header() etc with
>   # declare_dependency(). Thus the tests below use the library looked up
>   # above.  Once we require a newer meson version, we can simplify.
>   gssapi = declare_dependency(dependencies: gssapi_deps)
> endif
> 
> I didn't quite understand what was meant by this.  This code is relatively
> new, so maybe someone who worked on it still remembers and can offer a
> suggestion.

If you use declare_dependency(), older versions can't use compiler tests like
check_header() that reference that dependency.  I.e. if the tests pass with
0.57 after simplifying this, it's fine.



> Along the way, I also found that our meson.build always issues a warning
> when run on Windows/msvc, which I fixed.  (Should probably be backpatched.)

Agreed. Looks like that came in with bc46104fc9aa


> To help find all the places to update for deprecations etc., I used the
> option meson setup --fatal-meson-warnings.  This seems quite useful, so I'm
> also suggesting adding it to the CI tasks.  I think this could be useful in
> general, as I've seen more than zero times someone submitting a patch that
> accidentally violates the meson version requirement in some way, and we
> might as well catch those early.

IDK about fatal meson warnings, at least on windows and macos, where we will
quickly upgrade the meson version to something new. That likely would lead to
a bunch of noisy build failures. It'd probably be fine if we enabled it on
linux.



> @@ -3898,106 +3887,102 @@ endif
>  # The End, The End, My Friend
>  ###############################################################
>  
> -if meson.version().version_compare('>=0.57')
> +summary(
> +  {
> +    'data block size': '@0@ kB'.format(cdata.get('BLCKSZ') / 1024),
> +    'WAL block size': '@0@ kB'.format(cdata.get('XLOG_BLCKSZ') / 1024),
> +    'segment size': get_option('segsize_blocks') != 0 ?
> +      '@0@ blocks'.format(cdata.get('RELSEG_SIZE')) :
> +      '@0@ GB'.format(get_option('segsize')),
> +  },
> +  section: 'Data layout',
> +)

I didn't look through this part of the diff, I assume it's just reindenting.

The rest looks good to me.

Greetings,

Andres Freund


Reply via email to