meson: Regression breaking build of glib

This PR in Meson master breaks build of glib: https://github.com/mesonbuild/meson/pull/6179 beacuse it adds many \ in its config.h.

About this issue

  • Original URL
  • State: open
  • Created 5 years ago
  • Comments: 34 (34 by maintainers)

Most upvoted comments

So conditionalize it on a define…

As for being a step backwards, so is reverting the commit that this issue is about.

The only correct solution to this is to deprecate the thing that glib is doing (which it should not have done and should have reported as a bug) and either say “but you could have always used a template” or “okay, let’s add a special API for this extremely edge case scenario”.

Either way, it’s wrong to use set() like this. It was always wrong. Any solution going forward must acknowledge that it was wrong.

For the sake of being polite and allowing people to build old versions of buggy glib using new versions of meson, the courtesy of adding a deprecation shim for people relying on the buggy behavior shall be instituted.

Hmmm… actually I quickly did the patch adding the warning + special-casing already but I am too tired to actually test it (i.e. build glib now to test). I’ll do the test tomorrow and push a merge-request for verification when I will have confirmed it to be good.

Now I’ll go to bed! 💤

The problem is there are no other way of injecting code in the header file, as far as I know. Yes that hack is ugly, but meson has no other practical way.

Forcing to use new API is not acceptable solution for glib, because its maintainer wants to keep the minimum meson version required to the one shipped in debian stable (0.49.2). I personally disagree with that, but it’s a reasonable argument.

I totally agree with you that it’s abusing set(), and I totally agree adding a kwarg sucks. Everything sux. (╯°□°)╯︵ ┻━┻