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: Eric Blake
Subject: Re: [Qemu-devel] [PATCH for-2.9 17/47] qapi: The #optional tag is redundant, drop
Date: Tue, 14 Mar 2017 15:14:57 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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

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