Build-time tests fail with Meson 0.55.0
The libpeas Debian package (1.26.0 and 1.28.0) fails build-time tests since upgrading to Meson 0.55.0:
Bail out! ERROR:../tests/libpeas/testing/testing.c:54:testing_init: assertion failed (error == NULL): Typelib file for namespace 'Introspection', version '1.0' not found (g-irepository-error-quark, 0)
This appears to be caused by a behaviour change in Meson: Introspection-1.0.gir
and Introspection-1.0.typelib
are no longer generated, unless explicitly built with ninja -C ${builddir} Introspection-1.0.typelib
.
I am honestly not sure whether this is a bug in Meson or a bug in libpeas, so I'm reporting it to both projects: see https://github.com/mesonbuild/meson/issues/7756 for the other side of this.
I have a workaround (if this is a Meson bug) or a solution (if this is a libpeas bug), which is to use
test(
...,
depends: [libintrospection_gir],
...
)
so that the test()
(and not just the executable()
) explicitly depends on the GIR/typelib target. See !29 (merged).