From 79935ff8355d1f2a0b790233ad71a43517afd8d5 Mon Sep 17 00:00:00 2001 From: Jan200101 Date: Tue, 30 Sep 2025 22:15:50 +0200 Subject: deprecate variable substitution with boolean values --- mesonbuild/utils/universal.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mesonbuild') diff --git a/mesonbuild/utils/universal.py b/mesonbuild/utils/universal.py index ad652aab1..6ba5474e4 100644 --- a/mesonbuild/utils/universal.py +++ b/mesonbuild/utils/universal.py @@ -1266,6 +1266,9 @@ def do_replacement_meson(regex: T.Pattern[str], line: str, if isinstance(var, str): var_str = var elif isinstance(var, int): + if isinstance(var, bool): + msg = f'Variable substitution with boolean value {varname!r} is deprecated.' + mlog.deprecation(msg) var_str = str(var) else: msg = f'Tried to replace variable {varname!r} value with ' \ -- cgit v1.2.3