diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2024-11-01 10:45:12 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-11-15 11:32:50 -0800 |
| commit | 929df93ba80be347bea5df850ebce280aed64be7 (patch) | |
| tree | fa783dd5425b47a38c789c9339a797ac0e172e6a /mesonbuild/interpreter/interpreter.py | |
| parent | b3f9b9dc06fcd6c0a3070380b42e0ab5fd6c1226 (diff) | |
| download | meson-929df93ba80be347bea5df850ebce280aed64be7.tar.gz | |
interpreter: remove current_lineno
This was only used in a couple of places, and requires extra tracking to
ensure it is correct, while we already have `current_node.lineno`, which
is always accurate and up to date.
I have also fixed a potential strict-null issue by using a sentinel node
for `current_node`
Diffstat (limited to 'mesonbuild/interpreter/interpreter.py')
| -rw-r--r-- | mesonbuild/interpreter/interpreter.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/interpreter/interpreter.py b/mesonbuild/interpreter/interpreter.py index 99530a8c8..2c277ea13 100644 --- a/mesonbuild/interpreter/interpreter.py +++ b/mesonbuild/interpreter/interpreter.py @@ -2701,11 +2701,11 @@ class Interpreter(InterpreterBase, HoldableObject): ofile_rpath = os.path.join(self.subdir, output) if ofile_rpath in self.configure_file_outputs: mesonbuildfile = os.path.join(self.subdir, 'meson.build') - current_call = f"{mesonbuildfile}:{self.current_lineno}" + current_call = f"{mesonbuildfile}:{self.current_node.lineno}" first_call = "{}:{}".format(mesonbuildfile, self.configure_file_outputs[ofile_rpath]) mlog.warning('Output file', mlog.bold(ofile_rpath, True), 'for configure_file() at', current_call, 'overwrites configure_file() output at', first_call) else: - self.configure_file_outputs[ofile_rpath] = self.current_lineno + self.configure_file_outputs[ofile_rpath] = self.current_node.lineno (ofile_path, ofile_fname) = os.path.split(os.path.join(self.subdir, output)) ofile_abs = os.path.join(self.environment.build_dir, ofile_path, ofile_fname) |
