From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56626) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZI2wi-0007rr-FT for qemu-devel@nongnu.org; Wed, 22 Jul 2015 18:57:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZI2we-00068k-FJ for qemu-devel@nongnu.org; Wed, 22 Jul 2015 18:57:04 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35670) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZI2we-00068Y-8d for qemu-devel@nongnu.org; Wed, 22 Jul 2015 18:57:00 -0400 References: <1435782155-31412-1-git-send-email-armbru@redhat.com> <1435782155-31412-27-git-send-email-armbru@redhat.com> <55B00970.2060206@redhat.com> From: Eric Blake Message-ID: <55B01FB5.4030004@redhat.com> Date: Wed, 22 Jul 2015 16:56:53 -0600 MIME-Version: 1.0 In-Reply-To: <55B00970.2060206@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="dMUa0mwS2ME6Vev1gXa5GrkuROg24VUdD" Subject: Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, berto@igalia.com, mdroth@linux.vnet.ibm.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --dMUa0mwS2ME6Vev1gXa5GrkuROg24VUdD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 07/22/2015 03:21 PM, Eric Blake wrote: > On 07/01/2015 02:22 PM, Markus Armbruster wrote: >> Fixes flat unions to get the base's base members. Test case is from >> commit 2fc0043, in qapi-schema-test.json: >> >=20 > Okay, I see a cause for part of my confusion. >=20 >> =20 > ...and wrote the definitions at the end (so code motion 2 is that the > definitions are now interleaved with all other definitions). >=20 > Attached a few quick hacks that reduce (but not eliminate) some of the > visitor's churn to the generated files, by consolidating the location o= f > the builtins and cleaning up struct declarations as separate cleanups > (to be applied prior to 26/47), then updating the visitor to use the > same builtin order (to be applied after or squashed with 26/47). By the way, I'm perfectly fine if the initial conversion to the visitor keeps .c output separate into two groups to make review easier, then a later patch simplifies things back to a single sorting over the whole file (and undoing the grouping after conversion to visitor will be easier than figuring out how to interleave the builtin array visitors into the right sorted order prior to use of the visitor). I like the final result of everything sorted, it's just that I think it is easier to validate the final result when it is broken into stages with no one step doing too much, even if some of the intermediate stages do more work than needed and get undone by the final stage. Or put another way, your next spin of the series could include your original 26 + my hack 003 squashed together as one patch (conversion to visitor with minimized generated diff noise), followed by a revert of my hack 003 as the next (no need to group builtins together in the long run)= =2E [and for the record, I mention this because that's the approach I took in my earlier cleanups: commit fd41dd4e included a hack to rename 'type' to 'struct' in the generator, so that commit 895a2a80 could be quite mindless without touching the generator, and then commit 3e391d35 undid my hack. When I originally wrote the conversion in an earlier version of the series, I did not have that hack in place and the resulting single patch was too big; breaking it up made my submission and the review easier.] --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --dMUa0mwS2ME6Vev1gXa5GrkuROg24VUdD 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/ iQEcBAEBCAAGBQJVsB+6AAoJEKeha0olJ0NqJqQH/A821GTpImj+9zlGJL2XhwFY ScjSADNQ/X6QAglfAwyqO/KWm4HJjT8xoRDiXyrJzLxy6nmVoyOlO2EdE7zGB7lU sTg7Ln1D/R6sNS3Swfao0LwJ7bY1pH0Bvl/G2ovx/ql0N60UYORMO4cFIMbpWeqr Brq/3QT/IAV8m985UlV0lOM3KRcpep6eEYRhQSGCMvcvRdIT9lZaeS4T6jD9NvaT XAEM4ccxB5gJ9j94i22xua7+MzrH9H26bVJBXlA74fNhfa/kbOSuztqcMKGxYDVj w4TRAufGJE9GOQOdSQiezFtFwuU7egJ+3A5baVPfSOFBlF83ARPWRAlxljCiX7A= =C/qK -----END PGP SIGNATURE----- --dMUa0mwS2ME6Vev1gXa5GrkuROg24VUdD--