From 505b5b23915ec98624e81eabeb59ac17ea18ff47 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 28 Oct 2020 23:31:22 +0100 Subject: gnome: Tweak error message It's an easy mistake to do this: gir1 = gnome.generate_gir(...) gir2 = gnome.generate_gir(... includes: ['GObject-2.0', gir1]) This fails with an error: ERROR: Gir includes must be str, GirTarget, or list of them. The issue is that the 'gir1[0]' should be passed instead of 'gir1'. To make the problem slightly clearly, tweak the error message to be: ERROR: Gir includes must be str, GirTarget, or list of them. Got TypelibTarget. --- mesonbuild/modules/gnome.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mesonbuild') diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index 907a609..2d32328 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -487,7 +487,8 @@ class GnomeModule(ExtensionModule): depends += [inc] else: raise MesonException( - 'Gir includes must be str, GirTarget, or list of them') + 'Gir includes must be str, GirTarget, or list of them. ' + 'Got %s.' % type(inc).__name__) return ret -- cgit v1.1