Re: minimum Meson version
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-06-18T08:58:22Z
Lists: pgsql-hackers
Attachments
- 0001-meson-Fix-meson-warning.patch (text/plain) patch 0001
- 0002-ci-Run-meson-with-fatal-meson-warnings.patch (text/plain) patch 0002
- 0003-meson-Increase-minimum-version-to-0.57.patch (text/plain) patch 0003
- 0004-meson-Remove-conditionals-for-Meson-versions-lower-t.patch (text/plain) patch 0004
- 0005-meson-Fix-deprecation-warnings.patch (text/plain) patch 0005
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. 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.) 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.
Commits
-
meson: Increase minimum version to 0.57.2
- f039c2244110 19 (unreleased) landed
-
meson: Fix meson warning
- 629cc1623168 16.10 landed
- 2499c3490b2f 17.6 landed
- 2c0d8b95080e 18.0 landed