aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Schwartz <eschwartz@archlinux.org>2021-11-21 13:37:25 -0500
committerEli Schwartz <eschwartz@archlinux.org>2021-11-22 16:28:13 -0500
commit1c2461f5c7687f63bb02dd306889480d36e97b3c (patch)
tree379c68f89971b04343961d4833c91cc1bd479a13
parent1b1ecec920c5ce480ea109557b978155f63a3178 (diff)
downloadmeson-1c2461f5c7687f63bb02dd306889480d36e97b3c.zip
meson-1c2461f5c7687f63bb02dd306889480d36e97b3c.tar.gz
meson-1c2461f5c7687f63bb02dd306889480d36e97b3c.tar.bz2
simplify passing some nodes around
Every function has a copy of the node as a kwarg, and doesn't need to go through the class's self.current_node.
-rw-r--r--mesonbuild/interpreter/interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py
index d946678..5b108c7 100644
--- a/mesonbuild/interpreter/interpreter.py
+++ b/mesonbuild/interpreter/interpreter.py
@@ -1159,7 +1159,7 @@ external dependencies (including libraries) must go to "dependencies".''')
tv = FeatureNew.get_target_version(self.subproject)
if FeatureNew.check_version(tv, '0.54.0'):
mlog.warning('add_languages is missing native:, assuming languages are wanted for both host and build.',
- location=self.current_node)
+ location=node)
success = self.add_languages(langs, False, MachineChoice.BUILD)
success &= self.add_languages(langs, required, MachineChoice.HOST)
@@ -1731,7 +1731,7 @@ external dependencies (including libraries) must go to "dependencies".''')
kwargs['input'] = self.source_strings_to_files(extract_as_list(kwargs, 'input'))
except mesonlib.MesonException:
mlog.warning(f'''Custom target input '{kwargs['input']}' can't be converted to File object(s).
-This will become a hard error in the future.''', location=self.current_node)
+This will become a hard error in the future.''', location=node)
kwargs['env'] = self.unpack_env_kwarg(kwargs)
if 'command' in kwargs and isinstance(kwargs['command'], list) and kwargs['command']:
if isinstance(kwargs['command'][0], str):