]> git.proxmox.com Git - mirror_qemu.git/commit - qapi/block-core.json
qapi: The #optional tag is redundant, drop
authorMarkus Armbruster <armbru@redhat.com>
Wed, 15 Mar 2017 12:57:06 +0000 (13:57 +0100)
committerMarkus Armbruster <armbru@redhat.com>
Thu, 16 Mar 2017 06:13:02 +0000 (07:13 +0100)
commit1d8bda128d2ff1f7e589c90d0ac468b95d260757
tree697f7ef26b1d5d4fb2fbfc9022e2c4122fe6e237
parentaa964b7fdc2b9c6fd0dd530c44563b2a9d891d0f
qapi: The #optional tag is redundant, drop

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 <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1489582656-31133-18-git-send-email-armbru@redhat.com>
18 files changed:
docs/qapi-code-gen.txt
docs/writing-qmp-commands.txt
qapi-schema.json
qapi/block-core.json
qapi/block.json
qapi/crypto.json
qapi/event.json
qapi/introspect.json
qapi/rocker.json
qapi/trace.json
qga/qapi-schema.json
scripts/qapi.py
scripts/qapi2texi.py
tests/Makefile.include
tests/qapi-schema/doc-optional.err [deleted file]
tests/qapi-schema/doc-optional.exit [deleted file]
tests/qapi-schema/doc-optional.json [deleted file]
tests/qapi-schema/doc-optional.out [deleted file]