From 6c9e0fd3a4992cba2c443e2ec34e068d8592ddd3 Mon Sep 17 00:00:00 2001 From: Eli Schwartz Date: Wed, 26 Jan 2022 19:53:20 -0500 Subject: [PATCH] remove incorrect deprecated feature for vcs_tag In commit 06481666f4e74ecef01e59351fc345ab0962d998 this warning got moved from build.py to the interpreter. Unfortunately it got added to the wrong function... it is supposed to be part of custom_target and even mentions this as the feature_name. Since then, build_always became a KwargInfo and has the deprecated-since attribute baked into it. But it didn't have the additional message which it really should have. Add that message at the same time we remove it from vcs_tag. --- mesonbuild/interpreter/interpreter.py | 2 -- mesonbuild/interpreter/type_checking.py | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 89307330c..841978095 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -1655,8 +1655,6 @@ external dependencies (including libraries) must go to "dependencies".''') raise InterpreterException('Unknown target_type.') @permittedKwargs({'input', 'output', 'fallback', 'command', 'replace_string'}) - @FeatureDeprecatedKwargs('custom_target', '0.47.0', ['build_always'], - 'combine build_by_default and build_always_stale instead.') @noPosargs def func_vcs_tag(self, node, args, kwargs): if 'input' not in kwargs or 'output' not in kwargs: diff --git a/mesonbuild/interpreter/type_checking.py b/mesonbuild/interpreter/type_checking.py index 897315d20..52a900561 100644 --- a/mesonbuild/interpreter/type_checking.py +++ b/mesonbuild/interpreter/type_checking.py @@ -285,6 +285,7 @@ CT_BUILD_BY_DEFAULT: KwargInfo[T.Optional[bool]] = KwargInfo('build_by_default', CT_BUILD_ALWAYS: KwargInfo[T.Optional[bool]] = KwargInfo( 'build_always', (bool, NoneType), deprecated='0.47.0', + deprecated_message='combine build_by_default and build_always_stale instead.', ) CT_BUILD_ALWAYS_STALE: KwargInfo[T.Optional[bool]] = KwargInfo(