fix broken module tests which caused gtkdoc-check to traceback on assert

Regression in commit 566c2c9a9c.

The interpreter details are a bit of black magic. Functions expect
tuples, but they receive lists and then the type-checking decorators
convert those to tuples.

So, directly manhandling a self._interpreter.func_*() but passing it the
tuple it nominally expected, actually explodes in your face by way of
failing an assert, then dumping 'ERROR: Unhandled python exception'.

Fixes use of gnome.gtkdoc(..., check: true), for example when building
glib.
pull/10112/head
Eli Schwartz 3 years ago committed by Nirbheek Chauhan
parent f04173ec8f
commit 761d691079
  1. 5
      mesonbuild/modules/__init__.py

@ -91,8 +91,11 @@ class ModuleState:
'env': env, 'env': env,
'depends': depends, 'depends': depends,
} }
# typed_* takes a list, and gives a tuple to func_test. Violating that constraint
# makes the universe (or at least use of this function) implode
real_args = list(args)
# TODO: Use interpreter internal API, but we need to go through @typed_kwargs # TODO: Use interpreter internal API, but we need to go through @typed_kwargs
self._interpreter.func_test(self.current_node, args, kwargs) self._interpreter.func_test(self.current_node, real_args, kwargs)
def get_option(self, name: str, subproject: str = '', def get_option(self, name: str, subproject: str = '',
machine: MachineChoice = MachineChoice.HOST, machine: MachineChoice = MachineChoice.HOST,

Loading…
Cancel
Save