[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 10/22] qapi: Convert simple union TransactionAction to flat o
From: |
Eric Blake |
Subject: |
Re: [PATCH 10/22] qapi: Convert simple union TransactionAction to flat one |
Date: |
Mon, 13 Sep 2021 09:53:16 -0500 |
User-agent: |
NeoMutt/20210205-772-2b4c52 |
On Mon, Sep 13, 2021 at 02:39:20PM +0200, Markus Armbruster wrote:
> 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.
>
> To prepare for their removal, convert simple union TransactionAction
> to an equivalent flat one. Adds some boilerplate to the schema, which
> is a bit ugly, but a lot easier to maintain than the simple union
> feature.
>
> Cc: Kevin Wolf <kwolf@redhat.com>
> Cc: Hanna Reitz <hreitz@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> qapi/transaction.json | 111 +++++++++++++++++++++++++++++++++++++-----
> 1 file changed, 99 insertions(+), 12 deletions(-)
Same comments for each of 5-10 as for 4; the conversion is sane, and
the only question is on documentation, whether you want...
>
> diff --git a/qapi/transaction.json b/qapi/transaction.json
> index 894258d9e2..d7fc73d7df 100644
> --- a/qapi/transaction.json
> +++ b/qapi/transaction.json
> @@ -38,6 +38,91 @@
> { 'enum': 'ActionCompletionMode',
> 'data': [ 'individual', 'grouped' ] }
>
> +##
> +# @TransactionActionKind:
> +#
> +# Since: 6.1
... 6.2 here, or to preserve the implicit...
> ##
> # @TransactionAction:
> #
> @@ -60,19 +145,21 @@
> # Since: 1.1
...1.1 matching when the simple union was first formed (actually, this
simple union has grown over time, which makes it trickier to decide
which historical Since: to use on each Wrapper, so I'd lean towards
6.2 on all of them as being less work).
For patches 5-10:
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
- [PATCH 00/22] qapi: Remove simple unions from the schema language, Markus Armbruster, 2021/09/13
- [PATCH 02/22] qapi: Stop enforcing "type name should not end in 'Kind', Markus Armbruster, 2021/09/13
- [PATCH 06/22] qapi: Convert simple union MemoryDeviceInfo to flat one, Markus Armbruster, 2021/09/13
- [PATCH 10/22] qapi: Convert simple union TransactionAction to flat one, Markus Armbruster, 2021/09/13
- [PATCH 05/22] qapi: Convert simple union TpmTypeOptions to flat one, Markus Armbruster, 2021/09/13
- [PATCH 04/22] qapi: Convert simple union InputEvent to flat one, Markus Armbruster, 2021/09/13
- [PATCH 12/22] test-qobject-input-visitor: Wean off UserDefListUnion, Markus Armbruster, 2021/09/13