[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 03/16] qapi: Drop support for boxed alternate
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v2 03/16] qapi: Drop support for boxed alternate arguments |
Date: |
Tue, 10 Sep 2019 09:54:02 -0500 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 9/10/19 1:37 AM, Markus Armbruster wrote:
> Commands and events can define their argument type inline (default) or
> by referring to another type ('boxed': true, since commit c818408e44
> "qapi: Implement boxed types for commands/events", v2.7.0). The
> unboxed inline definition is an (anonymous) struct type. The boxed
> type may be a struct, union, or alternate type.
>
> The latter is problematic: docs/interop/qemu-spec.txt requires the
> value of the 'data' key to be a json-object, but any non-degenerate
> alternate type has at least one branch that isn't.
Good catch.
>
> Fortunately, we haven't made use of alternates in this context outside
> tests/. Drop support for them.
>
> QAPISchemaAlternateType.is_empty() is now unused. Drop it, too.
>
> Signed-off-by: Markus Armbruster <address@hidden>
> ---
> docs/devel/qapi-code-gen.txt | 12 ++++++------
> scripts/qapi/common.py | 15 ++++-----------
> tests/qapi-schema/qapi-schema-test.json | 2 +-
> tests/qapi-schema/qapi-schema-test.out | 2 +-
> 4 files changed, 12 insertions(+), 19 deletions(-)
Reviewed-by: Eric Blake <address@hidden>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3226
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-devel] [PATCH v2 00/16] qapi: Schema language cleanups & doc improvements, Markus Armbruster, 2019/09/10
- [Qemu-devel] [PATCH v2 05/16] tests/qapi-schema: Demonstrate bad reporting of funny characters, Markus Armbruster, 2019/09/10
- [Qemu-devel] [PATCH v2 02/16] qapi: Drop check_type()'s redundant parameter @allow_optional, Markus Armbruster, 2019/09/10
- [Qemu-devel] [PATCH v2 03/16] qapi: Drop support for boxed alternate arguments, Markus Armbruster, 2019/09/10
- Re: [Qemu-devel] [PATCH v2 03/16] qapi: Drop support for boxed alternate arguments,
Eric Blake <=
- [Qemu-devel] [PATCH v2 01/16] scripts/git.orderfile: Match QAPI schema more precisely, Markus Armbruster, 2019/09/10
- [Qemu-devel] [PATCH v2 04/16] docs/devel/qapi-code-gen: Minor specification fixes, Markus Armbruster, 2019/09/10
- [Qemu-devel] [PATCH v2 11/16] qapi: Adjust frontend errors to say enum value, not member, Markus Armbruster, 2019/09/10
- [Qemu-devel] [PATCH v2 10/16] qapi: Permit omitting all flat union branches, Markus Armbruster, 2019/09/10