[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches
From: |
Markus Armbruster |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches |
Date: |
Fri, 18 May 2018 08:45:53 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
Eric Blake <address@hidden> writes:
> On 05/17/2018 03:05 AM, Markus Armbruster wrote:
>>>>>>>> QAPI language design alternatives:
>>>>>>>>
>>>>>>>> 1. Having unions cover all discriminator values explicitly is useful.
>>>>>
>>>>>>>> 2. Having unions repeat all the discriminator values explicitly is not
>>>>>>>> useful. All we need is replacing the code enforcing that by code
>>>>>>>> defaulting missing ones to the empty type.
>>>>>>>>
>
>>> I think I'd vote for 2 (never enforce all-branches coverage) as well.
>>
>> Eric, what do you think?
>
> I'm sold. Let's go ahead and make the change that for any flat union,
> a branch not listed defaults to the empty type (no added fields)
> rather than being an error, then simplify a couple of the existing
> flat unions that benefit from that.
Anton, would you like to give this a try?
[...]
- [Qemu-devel] [PATCH 2/2] qapi: avoid empty CpuInfoOther type, (continued)
- [Qemu-devel] [PATCH 2/2] qapi: avoid empty CpuInfoOther type, Anton Nefedov, 2018/05/11
- [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Anton Nefedov, 2018/05/11
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Markus Armbruster, 2018/05/14
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Eric Blake, 2018/05/14
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Markus Armbruster, 2018/05/15
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Eric Blake, 2018/05/15
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Markus Armbruster, 2018/05/15
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Anton Nefedov, 2018/05/16
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Markus Armbruster, 2018/05/17
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Eric Blake, 2018/05/17
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches,
Markus Armbruster <=
- Re: [Qemu-devel] [PATCH 1/2] qapi: allow flat unions with empty branches, Anton Nefedov, 2018/05/18