qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.9 17/47] qapi: The #optional tag is redund


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH for-2.9 17/47] qapi: The #optional tag is redundant, drop
Date: Wed, 15 Mar 2017 08:15:36 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Eric Blake <address@hidden> writes:

> On 03/13/2017 01:18 AM, Markus Armbruster wrote:
>> We traditionally mark optional members #optional in the doc comment.
>> Before commit 3313b61, this was entirely manual.
>> 
>> Commit 3313b61 added some automation because its qapi2texi.py relied
>> on #optional to determine whether a member is optional.  This is no
>> longer the case since the previous commit: the only thing qapi2texi.py
>> still does with #optional is stripping it out.  We still reject bogus
>> qapi-schema.json and six places for qga/qapi-schema.json.
>> 
>> Thus, you can't actually rely on #optional to see whether something is
>> optional.  Yet we still make people add it manually.  That's just
>> busy-work.
>> 
>> Drop the code to check, fix up and strip out #optional, along with all
>> instances of #optional.  To keep it out, add code to reject it, to be
>> dropped again once the dust settles.
>> 
>> No change to generated documentation.
>> 
>> Signed-off-by: Markus Armbruster <address@hidden>
>> ---
>>  docs/qapi-code-gen.txt              |  16 +-
>>  docs/writing-qmp-commands.txt       |   4 +-
>>  qapi-schema.json                    | 378 ++++++++++++++++----------------
>>  qapi/block-core.json                | 418 
>> ++++++++++++++++++------------------
>
> You'll have to rebase this on master, due to ...
>
>
>> @@ -2349,17 +2349,17 @@
>>  #
>>  # @volume:              Name of the Archipelago volume image
>>  #
>> -# @mport:               #optional The port number on which mapperd is
>> +# @mport:               The port number on which mapperd is
>>  #                       listening. This is optional
>>  #                       and if not specified, QEMU will make Archipelago
>>  #                       use the default port (1001).
>>  #
>
> ...commit e32ccbc killing broken archipelago

Yes.  Thanks for the heads-up.



reply via email to

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