qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 00/22] qapi: Remove simple unions from the schema language


From: Markus Armbruster
Subject: Re: [PATCH 00/22] qapi: Remove simple unions from the schema language
Date: Mon, 13 Sep 2021 14:49:21 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)

Markus Armbruster <armbru@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-armbru@redhat.com>

In master now.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]