From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38499) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz6bQ-00008r-9G for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:56:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz6bD-0002hE-TJ for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:56:16 -0400 Received: from mx1.redhat.com ([209.132.183.28]:60186) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz6bD-0002gr-Lc for qemu-devel@nongnu.org; Mon, 23 Jun 2014 11:56:03 -0400 Message-ID: <53A84E10.90201@redhat.com> Date: Mon, 23 Jun 2014 09:56:00 -0600 From: Eric Blake MIME-Version: 1.0 References: <1403253206-11133-1-git-send-email-imammedo@redhat.com> <53A45753.6090505@redhat.com> <53A4C815.4040003@gmail.com> In-Reply-To: <53A4C815.4040003@gmail.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="69qXoGXaWviKgp2vvX0jE95uNkMeOHXl4" Subject: Re: [Qemu-devel] [PATCH v3] qmp: add ACPI_DEVICE_OST event handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Wenchao Xia , Igor Mammedov , qemu-devel@nongnu.org Cc: mst@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --69qXoGXaWviKgp2vvX0jE95uNkMeOHXl4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/20/2014 05:47 PM, Wenchao Xia wrote: >> Not your fault, as the problem already exists, but it's a bit awkward >> that qapi-event.json is not self-contained, and your patch is only >> making it worse. qapi-event.json only makes sense when included by >> qapi-schema.json, when ideally it would be nice if it made sense if >> compiled in isolation. I already pointed this fact out on Wenchao's >> series that made events part of QAPI, but fixing it first requires >> teaching the code generators to flag places where a type is used witho= ut >> a pre-definition, so that we know which types have to be moved into a >> common include. So don't let this comment hold up your patch. >> > I think two issues should be addressed: > 1 don't let generator guess the type if define is not found. But we WANT to allow use of a type so long as it gets defined later in the same file. So the trick is distinguishing between: base.json - use of 'TypeFoo' total.json: include base.json, define 'TypeFoo' (broken, base.json was not self-contained) vs. base.json - define 'TypeFoo' total.json - use of 'TypeFoo', then include base.json (supported - even though 'TypeFoo' was used prior to being defined, the include later in the file meant that total.json was self-contained) > 2 Support duplicated include, that is: >=20 > qapi/types.json > | > --------------------------- > | | > qapi/qapi-event.json qapi/block.json > | | > qapi-schema-json >=20 > Making sure above include doesn't generate two copy of types from > qapi/types.json. We already support that. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --69qXoGXaWviKgp2vvX0jE95uNkMeOHXl4 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJTqE4QAAoJEKeha0olJ0NqYA4H/jf/eOs0zkAboF+vNJqN2mmj QCkGNFh5FJ8Tah8waWl25ubgKEMdfzxC0mpHl2fGef19dMZIk0o7kVjipC/tzZiC L8o3mGghZYsu0a/Xha3PlCABaaZWQxGZ15z58PC7MaDz6sr3jwo0dxKcZvj5IVoo 9DNaTSEJkSWZfcsBvN8LQ8ctTSzPg7X7cRii1NorbJN9RvaUm4gidTzCkg1VA9op PmIbXKCKk0CAju7Gv9iV2vlXyX6tmpIj2PUeSjvbxpOhT2nFFFNayZGsf7WErVhe TdkYjtNAGfcxc5m6/98FI6RtIimuvRsgTZVbVrzFMI8/5ER1xzV15Ax0lkf9I1E= =igOH -----END PGP SIGNATURE----- --69qXoGXaWviKgp2vvX0jE95uNkMeOHXl4--