From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtMaD-0002oX-8Y for qemu-devel@nongnu.org; Mon, 02 Nov 2015 16:24:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZtMa9-0005DR-Ve for qemu-devel@nongnu.org; Mon, 02 Nov 2015 16:24:05 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60506) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZtMa9-0005D6-QV for qemu-devel@nongnu.org; Mon, 02 Nov 2015 16:24:01 -0500 References: <1446052473-19170-1-git-send-email-eblake@redhat.com> <1446052473-19170-8-git-send-email-eblake@redhat.com> <871tc8tnsl.fsf@blackfin.pond.sub.org> From: Eric Blake Message-ID: <5637D470.5040203@redhat.com> Date: Mon, 2 Nov 2015 14:24:00 -0700 MIME-Version: 1.0 In-Reply-To: <871tc8tnsl.fsf@blackfin.pond.sub.org> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="b0owQABNITX5NWchlGKGU54RQsMM4b5BW" Subject: Re: [Qemu-devel] [PATCH v8 07/17] qapi: Rework collision assertions 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) --b0owQABNITX5NWchlGKGU54RQsMM4b5BW Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/02/2015 08:37 AM, Markus Armbruster wrote: >=20 > Not checked: variant's members don't collide with non-variant members. > I think this check got lost when we simplified > QAPISchemaObjectTypeVariants to hold a single member. Yep, I found the culprit: in your v2 proposal for QAPISchema, you had: +class QAPISchemaObjectTypeVariant(QAPISchemaObjectTypeMember): + def __init__(self, name, typ, flat): + QAPISchemaObjectTypeMember.__init__(self, name, typ, False) + assert isinstance(flat, bool) + self.flat =3D flat + def check(self, schema, tag_type, seen): + QAPISchemaObjectTypeMember.check(self, schema, [], seen) + assert self.name in tag_type.values + if self.flat: + self.type.check(schema) + assert isinstance(self.type, QAPISchemaObjectType) https://lists.gnu.org/archive/html/qemu-devel/2015-07/msg00394.html but the 'if self.flat' clause was lost in v3: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg00450.html I am in fact reinstating it here, but for v9, will do it in a separate patch rather than blended in with the rest of the changes. [wow - we've been hammering at this since July?] --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --b0owQABNITX5NWchlGKGU54RQsMM4b5BW 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/ iQEcBAEBCAAGBQJWN9RwAAoJEKeha0olJ0NqzNgH/iNl/OVyrf1/cVjJNw82XY6K TF2LyrJrewzB7BUMzMxDFd8rysPybonQQ6tJ6u1bJevYMHEruziSKkL6EbRFVi00 jF1oNSSAKqZBf1QSCFJZDuW3vVGh5OkbJFoKrUf7oMqmHS9HC5TKJMFZzZXQHOb+ DGBwlXtmLRnJkF8TS0Mose/aqq8VYtkCwp9U9FaLsShPtzirEV3cxdMTI0KJbSHH bZcztPlWBq3jhZoi/KQQjweNO0e4y1TrMtIWj2Az5+9Xj5rPbQznVrdrJZaWph4n XbBXob1LRe1Hi22+8UIipv3PBaaV/pyH74FbtLQqJQhceAZB19IhlKEl6RdFpA0= =Sbbx -----END PGP SIGNATURE----- --b0owQABNITX5NWchlGKGU54RQsMM4b5BW--