From b9ddea245ef39fc29bd30a446c937058460c2196 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Sat, 12 Jul 2025 11:28:45 +0200 Subject: mconf: print build option names including "build." Signed-off-by: Paolo Bonzini --- mesonbuild/mconf.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mesonbuild/mconf.py b/mesonbuild/mconf.py index 217379f0a..c55bc5f64 100644 --- a/mesonbuild/mconf.py +++ b/mesonbuild/mconf.py @@ -147,7 +147,7 @@ class Conf: Each column will have a specific width, and will be line wrapped. """ total_width = shutil.get_terminal_size(fallback=(160, 0))[0] - _col = max(total_width // 5, 20) + _col = max(total_width // 5, 24) last_column = total_width - (3 * _col) - 3 four_column = (_col, _col, _col, last_column if last_column > 1 else _col) @@ -207,11 +207,12 @@ class Conf: self.choices_col.append(choices) self.descr_col.append(descr) - def add_option(self, name: str, descr: str, value: T.Any, choices: T.Any) -> None: + def add_option(self, key: OptionKey, descr: str, value: T.Any, choices: T.Any) -> None: self._add_section() value = stringify(value) choices = stringify(choices) - self._add_line(mlog.green(name), mlog.yellow(value), mlog.blue(choices), descr) + self._add_line(mlog.green(str(key.evolve(subproject=None))), mlog.yellow(value), + mlog.blue(choices), descr) def add_title(self, title: str) -> None: self._add_section() @@ -248,7 +249,7 @@ class Conf: # printable_value = '' #if isinstance(o, options.UserFeatureOption) and o.is_auto(): # printable_value = auto.printable_value() - self.add_option(k.name, o.description, printable_value, o.printable_choices()) + self.add_option(k, o.description, printable_value, o.printable_choices()) def print_conf(self, pager: bool) -> None: if pager: -- cgit v1.2.3