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
Describe the bug
Trying to set nested subproject option in native file results in unhandled Python exception.
Traceback (most recent call last):
File "/home/meator/git/meson/mesonbuild/mesonmain.py", line 193, in runreturn options.run_func(options)
~~~~~~~~~~~~~~~~^^^^^^^^^
File "/home/meator/git/meson/mesonbuild/msetup.py", line 365, in run
app.generate()
~~~~~~~~~~~~^^
File "/home/meator/git/meson/mesonbuild/msetup.py", line 181, in generate
env = environment.Environment(self.source_dir, self.build_dir, self.options)
File "/home/meator/git/meson/mesonbuild/environment.py", line 634, in __init__self._load_machine_file_options(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
config, properties.build,
^^^^^^^^^^^^^^^^^^^^^^^^^
MachineChoice.BUILDifself.coredata.cross_files else MachineChoice.HOST)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/meator/git/meson/mesonbuild/environment.py", line 721, in _load_machine_file_options
subproject, section = section.split(':')
^^^^^^^^^^^^^^^^^^^ValueError: too many values to unpack (expected 2)ERROR: Unhandled python exception
This is a Meson bug and should be reported!
native_file.ini (also included in the archive below):
I think that should just be [sublib:project options], since Meson will promote nested subprojects. But we should definitely catch that and give a better error.
dcbaker
added a commit
to dcbaker/meson
that referenced
this issue
Feb 4, 2025
…subproject
Instead of having a raw python exception, provide a helpful error
message that `[sub:sub1:project options]` should just be `[sub1:project
options]`
No test is provided as this is basic error handling, and I felt it was
not worth adding to our test runtime to test that we don't raise a raw
exception.
Fixes: mesonbuild#14222
Describe the bug
Trying to set nested subproject option in native file results in unhandled Python exception.
native_file.ini
(also included in the archive below):To Reproduce
meson-repro-subproject-tree.tar.gz
Expected behavior
This either being possible or a descriptive error message being printed (and the exception being handled).
system parameters
1.7.0
and 0e6e687 (current HEAD)The text was updated successfully, but these errors were encountered: