aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2022-10-31 19:09:08 -0400
committerXavier Claessens <xclaesse@gmail.com>2022-10-31 20:19:43 -0400
commit8d8ce4fb774aacb26d4710627a245781df2a3446 (patch)
tree2a19384bc3274409bdae16f7fa5d86f3aa1dfa6c /mesonbuild
parent0ddca4d0d0513e9ce1721902393019d4a3903bda (diff)
downloadmeson-8d8ce4fb774aacb26d4710627a245781df2a3446.zip
meson-8d8ce4fb774aacb26d4710627a245781df2a3446.tar.gz
meson-8d8ce4fb774aacb26d4710627a245781df2a3446.tar.bz2
emit a FeatureNew when using include_directories as a string
This was introduced in commit 3a6e2aeed9737f1082571e868ba50e72957f27c7 as part of 0.50.0, but did not contain a FeatureNew. As a result, people would use it without realizing that they broke support for versions of Meson included in their minimum requirements.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/interpreter/interpreter.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index 7ecc49e..056cc32 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -2634,6 +2634,13 @@ class Interpreter(InterpreterBase, HoldableObject):
def extract_incdirs(self, kwargs, key: str = 'include_directories'):
prospectives = extract_as_list(kwargs, key)
+ if key == 'include_directories':
+ for i in prospectives:
+ if isinstance(i, str):
+ FeatureNew.single_use('include_directories kwarg of type string', '0.50.0', self.subproject,
+ f'Use include_directories({i!r}) instead', location=self.current_node)
+ break
+
result = []
for p in prospectives:
if isinstance(p, build.IncludeDirs):