Markus Armbruster <arm...@redhat.com> writes:

> Simple unions predate flat unions.  Having both complicates the QAPI
> schema language and the QAPI generator.  We haven't been using simple
> unions in new code for a long time, because they are less flexible and
> somewhat awkward on the wire.
>
> Get rid of them.  We should've done this long ago.
>
> This adds some boilerplate to the schema:
>
>     $ git-diff --shortstat master qapi
>      7 files changed, 461 insertions(+), 59 deletions(-)
>
> Well worth the language simplification, in my opinion:
>
>     $ git-diff --stat master scripts/ docs/
>      docs/devel/qapi-code-gen.rst | 137 
> ++++++++++---------------------------------
>      scripts/qapi/common.py       |  19 ++----
>      scripts/qapi/expr.py         |  48 +++++++--------
>      scripts/qapi/schema.py       | 101 +++++++------------------------
>      4 files changed, 80 insertions(+), 225 deletions(-)
>
> The complete diffstat looks even better, but is somewhat misleading,
> because it's dominated by two tests rewritten in a much more compact
> way.
>
> This series is based on my "[PULL 0/5] QAPI patches patches for
> 2021-09-13".
>
> Based-on: <20210913095038.3040776-1-arm...@redhat.com>

In master now.


Reply via email to