From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34786) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw1Ju-00062M-Aw for qemu-devel@nongnu.org; Tue, 10 Nov 2015 00:18:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zw1Jp-00063U-Dk for qemu-devel@nongnu.org; Tue, 10 Nov 2015 00:18:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:55572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zw1Jp-00063P-7x for qemu-devel@nongnu.org; Tue, 10 Nov 2015 00:18:09 -0500 References: <1446791754-23823-1-git-send-email-eblake@redhat.com> <1446791754-23823-24-git-send-email-eblake@redhat.com> <87vb9bgwlj.fsf@blackfin.pond.sub.org> <87a8qndx3l.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <56417E0F.6020509@redhat.com> Date: Mon, 9 Nov 2015 22:18:07 -0700 MIME-Version: 1.0 In-Reply-To: <87a8qndx3l.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="kQspJB4F6aquJl3GLsb3XbGqveAPUdD2d" Subject: Re: [Qemu-devel] [PATCH v10 23/30] qapi: Check for qapi collisions of flat union branches List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: qemu-devel@nongnu.org, Michael Roth This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --kQspJB4F6aquJl3GLsb3XbGqveAPUdD2d Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/09/2015 08:13 AM, Markus Armbruster wrote: > Markus Armbruster writes: >=20 >> Eric Blake 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). >=20 > 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. >=20 > That said, should we add a comment to QAPISchemaAlternateType.check()? > Perhaps: >=20 > # 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --kQspJB4F6aquJl3GLsb3XbGqveAPUdD2d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJWQX4PAAoJEKeha0olJ0NqSKUH/2JYuuu94CxNkyMCs9Pc5RNh wgmKj6r7AEAZWnplZQE9hl2yOyQR4Z8ldvsJBonuA5UWbqx+UoTLq+Lq5BUfVA/o KWJh+bEdzsF69O9D2bRg0HjZDmQuasK0ACnqoDjdSo1tkAmLy+9t56QsD5hxfeCC IxkUmLMU0kIdMVgOTb03riP9H17YchLSAZeTfzGGd/oss3DxAXs7ZI7cQp1y/th5 6HmNlUyemWFmAUVZBRagre+soWt4nF7VRkSwSP15fInyxGQSEMOK8HRFUkJvm1Ix lw8+7KRzBBd8px1iycqt/Mrgp1kOh44unLPV0x0v8vV/BsvNaqvDW0R6y/n5QHs= =bF5N -----END PGP SIGNATURE----- --kQspJB4F6aquJl3GLsb3XbGqveAPUdD2d--