[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of fl
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches |
Date: |
Mon, 9 Nov 2015 22:18:07 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
On 11/09/2015 08:13 AM, Markus Armbruster wrote:
> Markus Armbruster <address@hidden> writes:
>
>> Eric Blake <address@hidden> writes:
>>
>>> Right now, our ad hoc parser ensures that we cannot have a
>>> flat union that introduces any qapi member names that would
>>> conflict with the non-variant qapi members already present
>>> from the union's base type (see flat-union-clash-member.json).
>>> We want QAPISchemaObjectType.check() to make the same check,
>>> so we can later reduce some of the ad hoc checks.
>>>
>>> There is no impact to alternates, which intentionally do not
>>> need to call variants.check_clash() (there, at most one of
>>> the variant's branches will be an ObjectType, and even if one
>>> exists, we are not inlining the qapi members of that object
>>> into a parent object, the way we do for unions).
>
> Yes. QAPISchemaObjectTypeVariants.check_clash() checks for each
> variant's members clashing with other members in the same name space.
> For alternates, there are no such other members.
>
> That said, should we add a comment to QAPISchemaAlternateType.check()?
> Perhaps:
>
> # Not calling self.variant.check_clash(), because there's
> # nothing to clash with.
Sure; if there's another reason for a respin, I can add it here;
otherwise, it's already slated to be added in my respin of the patches
for redoing how alternates are laid out.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
- Re: [Qemu-devel] [PATCH v10 24/30] qapi: Factor out QAPISchemaObjectType.check_clash(), (continued)
[Qemu-devel] [PATCH v10 19/30] qapi: Fix up commit 7618b91's clash sanity checking change, Eric Blake, 2015/11/06
[Qemu-devel] [PATCH v10 18/30] qapi: Clean up after previous commit, Eric Blake, 2015/11/06
[Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches, Eric Blake, 2015/11/06
Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches, Eric Blake, 2015/11/10
Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches, Markus Armbruster, 2015/11/11
[Qemu-devel] [PATCH v10 27/30] qapi: Track owner of each object member, Eric Blake, 2015/11/06
[Qemu-devel] [PATCH v10 28/30] qapi: Detect collisions in C member names, Eric Blake, 2015/11/06