[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list generation |
Date: |
Tue, 28 Jul 2015 11:48:04 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 |
On 07/28/2015 05:15 AM, Markus Armbruster wrote:
>> Yeah, avoiding line wraps consumes fewer source bytes (fewer runs of
>> spaces), but the space isn't being wasted by storing generated files in
>> git, nor does the C compiler care which layout we use. And honestly,
>> it's easier to spot changes in a vertical list than it is on a long
>> horizontal line, if a parameter gets added (or removed, although adding
>> is the more likely action with qapi).
>
> Number of source bytes is not an issue.
>
> The generators make no effort to wrap source lines, except in the
> qapi_event_send_FOO()'s parameter lists.
>
> We could preserve that one-off. We could extend it to more places that
> can generate long lines, saddling the generation code with indentation
> concerns. I don't want to write such code, and I don't want to maintain
> it.
>
> Instead, why not keep the generators straightforward, and feed their
> result to indent when "pretty" is wanted? Requires an indent profile
> matching QEMU style.
Long lines aren't the end of the world. They may be harder to read when
diffing pre- and post-patch generated output to see if a generator
change makes sense, but you have a point that line wrapping is more
maintenance. So you win; keep the long lines, and if someone wants
wrapping, they can (re-)add it as a later patch series.
--
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 RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions, (continued)
- Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions, Eric Blake, 2015/07/22
- Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions, Markus Armbruster, 2015/07/27
- Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions, Eric Blake, 2015/07/27
- Re: [Qemu-devel] [PATCH RFC v2 26/47] qapi-types: Convert to QAPISchemaVisitor, fixing flat unions, Markus Armbruster, 2015/07/28
[Qemu-devel] [PATCH RFC v2 32/47] qapi-event: Convert to QAPISchemaVisitor, fixing data with base, Markus Armbruster, 2015/07/01
[Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list generation, Markus Armbruster, 2015/07/01
[Qemu-devel] [PATCH RFC v2 38/47] qapi-commands: De-duplicate output marshaling functions, Markus Armbruster, 2015/07/01
[Qemu-devel] [PATCH RFC v2 28/47] qapi-commands: Convert to QAPISchemaVisitor, Markus Armbruster, 2015/07/01
[Qemu-devel] [PATCH RFC v2 43/47] qmp: Improve netdev_add usage example in the manual, Markus Armbruster, 2015/07/01
[Qemu-devel] [PATCH RFC v2 42/47] qapi-schema: Fix up misleading specification of netdev_add, Markus Armbruster, 2015/07/01