News for hackers. Stuff that matters.
Re:Meson 1.0 Build System by foresto on Friday December 23, 2022 @11:40PM (#34114051)
Anecdote:

While backporting a new PipeWire release to my linux distro earlier this year, I discovered that it had added dependencies on Meson features so new that they didn't exist in Debian Stable. User-defined functions would have allowed me to shim those features for the older Meson version, greatly simplifying my work and minimizing my patches' footprint.

I'm not sure if that situation is common enough to justify user-defined functions to Meson's author, but it was frustrating, and it seemed ironic that a build system designed to smooth over platform compatibility problems had itself become one.

Re:Meson 1.0 Build System by bonzini on Saturday December 24, 2022 @02:47AM (#34114880)
Yeah that's a case where functions could be useful but I think the real problem there is the non-perfect backwards compatibility in Meson, which makes it unnecessarily hard to include new versions of it in stable distros.

The main culprit is GNOME packages because they were early adopters of Meson and thus had a few incorrect idioms that were cargo culted to a few dozen packages. For a similar issue in RHEL we decided to update Meson, but we needed to revert some changes that tightened the language. I do plan to include those changes in Meson in the near future, keyed on the minimum version in the "project" line, so that older packages are easier to build with newer Meson.

That said, did you consider backporting the new features to the older Meson in Debian stable?

Re:Meson 1.0 Build System by foresto on Saturday December 24, 2022 @03:05PM (#34120581)
> did you consider backporting the new features to the older Meson in Debian stable?

No, since modifying an additional project would run counter to the goal of minimizing the scope of the backport's changes. (Especially important when said project is a dependency of other packages, and could potentially break other things on the distro. This was Debian Stable, after all.)

Re:Meson 1.0 Build System by Flowdalic on Saturday December 24, 2022 @05:29AM (#34115619)
It should be possible to install meson via pip --user. Even though I prefer system-wide installations, I believe this weakens your argument for user defined functions in your situation.
Re:Meson 1.0 Build System by AnssiH on Saturday December 24, 2022 @06:02AM (#34115789)
You can also use run meson directly from its source tree with no installation steps, that's what we do in some cases.
Re:Meson 1.0 Build System by foresto on Saturday December 24, 2022 @02:59PM (#34120521)
> I believe this weakens your argument for user defined functions in your situation.

It does not. This backport was not for a single user, but for deployment into the package repo used by multiple systems (including build systems). A one-off Meson build would be unsuitable for this case.

In any case, note that I didn't claim it was impossible without user-defined functions. It was simply messier and more painful, much as a special Meson build would be.