bug(build, tests): broken dependency cycle associated with the `have_gtk4` variable
There is a broken dependency cycle associated with the have_gtk4
variable.
-
have_gtk4
is defined withskip_gtk_tests=false
- https://gitlab.gnome.org/GNOME/gjs/-/blob/master/meson.build#L683
-
have_gtk4
is required before defining and checking the meson option. - https://gitlab.gnome.org/GNOME/gjs/-/blob/master/installed-tests/js/meson.build#L206
As a result, when using the option: skip_gtk_tests=true
, the following error is returned:
gjs/installed-tests/js/meson.build:206:3: ERROR: Unknown variable "have_gtk4".
My proposed code fix is:
- Remove lines
682-684
frommeson.build
- Replace lines
206-209
in theinstalled-tests/js/meson.build
file with the following code:
if not get_option('skip_gtk_tests')
have_gtk4 = dependency('gtk4', required: false).found()
if have_gtk4
# FIXME: find out why GTK4 tries to acquire a message bus
dbus_tests += 'Gtk4'
endif
endif
I wanted to create a pull request with a fix but unfortunately forking is blocked.
Edited by Dominik Opyd