aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/interpreter.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-01-03 22:32:40 +0200
committerGitHub <noreply@github.com>2018-01-03 22:32:40 +0200
commit65f78a722ad0f8ab260e7cf24636ef38e8bd957f (patch)
tree76024acbc0c7d90e8edd69ad07c79124de622a46 /mesonbuild/interpreter.py
parentc814f1145bc521efd0a46b033751a6f844d24df5 (diff)
parentbcc95d7dd703779228ec81b92197e010d0e5a1ea (diff)
downloadmeson-65f78a722ad0f8ab260e7cf24636ef38e8bd957f.zip
meson-65f78a722ad0f8ab260e7cf24636ef38e8bd957f.tar.gz
meson-65f78a722ad0f8ab260e7cf24636ef38e8bd957f.tar.bz2
Merge pull request #2856 from jon-turney/warning-location
Consolidate warning location formatting
Diffstat (limited to 'mesonbuild/interpreter.py')
-rw-r--r--mesonbuild/interpreter.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/interpreter.py b/mesonbuild/interpreter.py
index 1abc134..29b4033 100644
--- a/mesonbuild/interpreter.py
+++ b/mesonbuild/interpreter.py
@@ -1574,7 +1574,7 @@ class Interpreter(InterpreterBase):
modname = args[0]
if modname.startswith('unstable-'):
plainname = modname.split('-', 1)[1]
- mlog.warning('Module %s has no backwards or forwards compatibility and might not exist in future releases.' % modname)
+ mlog.warning('Module %s has no backwards or forwards compatibility and might not exist in future releases' % modname, location=node)
modname = 'unstable_' + plainname
if modname not in self.environment.coredata.modules:
try:
@@ -1935,7 +1935,7 @@ to directly access options of other subprojects.''')
@noKwargs
def func_warning(self, node, args, kwargs):
argstr = self.get_message_string_arg(node)
- mlog.warning('%s in file %s, line %d' % (argstr, os.path.join(node.subdir, 'meson.build'), node.lineno))
+ mlog.warning(argstr, location=node)
@noKwargs
def func_error(self, node, args, kwargs):
@@ -2751,7 +2751,7 @@ root and issuing %s.
mlog.warning(
"The variable(s) %s in the input file %s are not "
"present in the given configuration data" % (
- var_list, inputfile))
+ var_list, inputfile), location=node)
else:
mesonlib.dump_conf_header(ofile_abs, conf.held_object)
conf.mark_used()