New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[regression] String formatting has regressed since 0.60. ERROR: Format placeholder @9@ out of range. #9530
Comments
0.59.3 works for me. 0.60.0 and 0.60.1 do not. |
pkg_config_path is a null list, and should never have been there to begin with (it makes no sense). In this case it seems that it's being flattened? Somewhat predictably, this bisects to commit d93d01b (#9207). Simple test case: project('issue 9530')
message('foo list: @0@'.format([])) In meson 0.59.4, this prints:
It is of debatable usefulness, but what about this? project('issue 9530')
message('foo list: @0@, bar list: @1@'.format(['--foo', 'barvalue'], ['--bar', 'barvalue'])) 0.59.4 output:
0.60.1 output:
|
IMHO the absolute last place we should ever be doing list flattening is in .format() and message(). |
String formatting should validly assume that printing a list means printing the list itself. Instead, something like this broke: 'one is: @0@ and two is: @1@'.format(['foo', 'bar'], ['baz']) which would evaluate as: 'one is: foo and two is: bar' or: 'the value of array option foobar is: @0@'.format(get_option('foobar')) which should evaluate with '-Dfoobar=[]' as 'the value of array option foobar is: []' But instead produced: meson.build:7:0: ERROR: Format placeholder @0@ out of range. Fixes mesonbuild#9530
(I am not even incredibly fond of list flattening everywhere, it's kind of weird and very prone to this sort of problem.) |
String formatting should validly assume that printing a list means printing the list itself. Instead, something like this broke: 'one is: @0@ and two is: @1@'.format(['foo', 'bar'], ['baz']) which would evaluate as: 'one is: foo and two is: bar' or: 'the value of array option foobar is: @0@'.format(get_option('foobar')) which should evaluate with '-Dfoobar=[]' as 'the value of array option foobar is: []' But instead produced: meson.build:7:0: ERROR: Format placeholder @0@ out of range. Fixes #9530
Describe the bug
There is a regression of as yet unknown cause in Meson's string formatting, as discovered by @alex3kov and diagnosed by myself at libsixel/libsixel#50. This regression causes previously building package to no longer build.
To Reproduce
https://github.com/libsixel/libsixel/blob/v1.10.3/meson.build
Expected behavior
Good build
system parameters
Plain build.
Arch Linux
Python 3.9.7
meson --version
Versions above 0.59.2 I confirm are affected.
ninja --version
if it's a Ninja buildWe do not get to Ninja step, Meson is the cause.
The text was updated successfully, but these errors were encountered: