You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unclear error message on parsing cross and native files #12025
Parsing of a cross file with a missing value causes unclear error messages about what the issue is:
cross.ini:
[constants]test =
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.11/site-packages/mesonbuild/mesonmain.py", line 194, in run
return options.run_func(options)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/mesonbuild/msetup.py", line 318, in run
app.generate()
File "/opt/homebrew/lib/python3.11/site-packages/mesonbuild/msetup.py", line 189, in generate
env = environment.Environment(self.source_dir, self.build_dir, self.options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/mesonbuild/environment.py", line 519, in __init__
config = coredata.parse_machine_files(self.coredata.cross_files)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/mesonbuild/coredata.py", line 1014, in parse_machine_files
parser = MachineFileParser(filenames)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/mesonbuild/coredata.py", line 968, in __init__
self.sections[s] = self._parse_section(s)
^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/mesonbuild/coredata.py", line 981, in _parse_section
res = self._evaluate_statement(ast.lines[0])
~~~~~~~~~^^^
IndexError: list index out of range
ERROR: Unhandled python exception
This is a Meson bug and should be reported!
system parameters
Cross-build, macOS Ventura, python 3.11.4, meson 1.2.0
changed the title [-]Unclear error messages on parsing cross and native files[/-][+]Unclear error message on parsing cross and native files[/+]on Jul 22, 2023
Activity
[-]Unclear error messages on parsing cross and native files[/-][+]Unclear error message on parsing cross and native files[/+]Allow empty value in machine file
machine file: Fix crash on empty value
machine file: Fix crash on empty value
machine file: Fix crash on empty value
machine file: Fix crash on empty value
machine file: Fix crash on empty value