[Top][All Lists]

[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

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]