qemu-devel
[Top][All Lists]
Advanced

[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: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH RFC v2 37/47] qapi: De-duplicate parameter list generation
Date: Wed, 29 Jul 2015 10:36:10 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eric Blake <address@hidden> writes:

> 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.

Settled.

Aside: diff-mode can color the parts of the changed lines that actually
differ.  Indispensable, and not just for long lines.



reply via email to

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