diff options
author | Eli Schwartz <eschwartz@archlinux.org> | 2022-01-12 18:42:44 -0500 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2022-01-12 18:55:25 -0800 |
commit | bda11fe25d1efe688d251148cb7cf7939cd50433 (patch) | |
tree | ba07e61221effca72c06ca9bcaf027ea1b18d4bf /mesonbuild/interpreter/interpreterobjects.py | |
parent | eeb110ab024b505f326ae907393cae761666ace0 (diff) | |
download | meson-bda11fe25d1efe688d251148cb7cf7939cd50433.zip meson-bda11fe25d1efe688d251148cb7cf7939cd50433.tar.gz meson-bda11fe25d1efe688d251148cb7cf7939cd50433.tar.bz2 |
gome.gdbus_codegen: fix annotations argument for multiple annotations, harder
The original attempted fix only allowed configuration to succeed, but
not building. It was modeled based on the gdbus-codegen documentation,
which states:
--annotate WHAT KEY VALUE WHAT KEY VALUE WHAT KEY VALUE
Add annotation (may be used several times)
which clearly indicates that gdbus-codegen accepts an --annotate flag
that is followed by a multiple of 3 values, despite this not actually
working.
The manpage actually contradicts the --help text:
--annotate ELEMENT KEY VALUE
Used to inject D-Bus annotations into the given XML files. []
... and gives examples that use multiple --annotate flags each with 3
arguments.
To better understand what meson is supposed to do here, we should look
at ef52e60936665c982cd17a4a17c2045b445d8e6d, which ported to
typed_kwargs. There is actually a big chunk of code to handle
annotations that got completely dropped, leading with a comment (that
did not get dropped): "they are a list of lists of strings..."
Reimplement this logic inside a validator/converter for the annotations
kwarg container:
- do not listify, we don't accept `annotations: ''` and listify is
supposed to be for when either x or list[x] is valid
- go back to checking for a list of exactly 3 values
- allow a list of the aforementioned, in the traditionally expected
form:
[
['foo1', 'foo2', 'foo3'],
['bar1', 'bar2', 'bar3'],
]
- pass one --annotate flag per 3-value-list
And add some better error reporting for the cause of errors when
processing lists of lists.
Diffstat (limited to 'mesonbuild/interpreter/interpreterobjects.py')
0 files changed, 0 insertions, 0 deletions