From: Eric Blake <eblake@redhat.com>
To: Markus Armbruster <armbru@redhat.com>, qemu-devel@nongnu.org
Cc: marcandre.lureau@redhat.com, mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH for-2.9 17/47] qapi: The #optional tag is redundant, drop
Date: Tue, 14 Mar 2017 12:59:45 -0500 [thread overview]
Message-ID: <c90b20a4-8180-4f73-6a99-bf71e124ea77@redhat.com> (raw)
In-Reply-To: <1489385927-6735-18-git-send-email-armbru@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 3806 bytes --]
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.
Yay! Let the computer do the work for us!
>
> 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>
> ---
> @@ -150,10 +148,10 @@ For example:
> #
> # Statistics of a virtual block device or a block backing device.
> #
> -# @device: #optional If the stats are for a virtual block device, the name
> -# corresponding to the virtual block device.
> +# @device: If the stats are for a virtual block device, the name
> +# corresponding to the virtual block device.
This loses the hanging indentation in the example, but I don't see you
making that change in the actual .json files. It shouldn't matter in
the long run, and is certainly easier if the way you generated this
patch was with sed scripts (where computing correct hanging indentation
after rewrapping is a lot harder than omitting it). I don't have any
strong opinions about the change (less typing, but slightly harder to
visually see that the following lines belong to the same parameter doc,
if you don't have blank lines between distinct parameter docs). I'm not
even sure if it you want to call it out in the commit message as an
intentional reformat, particularly since you didn't do it everywhere.
> +++ b/qapi-schema.json
> @@ -150,10 +150,10 @@
> #
> # @fdname: file descriptor name previously passed via 'getfd' command
> #
> -# @skipauth: #optional whether to skip authentication. Only applies
> +# @skipauth: whether to skip authentication. Only applies
> # to "vnc" and "spice" protocols
> #
> -# @tls: #optional whether to perform TLS. Only applies to the "spice"
> +# @tls: whether to perform TLS. Only applies to the "spice"
> # protocol
Again, whitespace changes shouldn't affect generated output, so
rewrapping lines like this would be more busy-work than necessary, even
though this particular example would now fit on one line.
> @@ -667,45 +667,45 @@
> #
...
> #
> -# @setup-time: #optional amount of setup time in milliseconds _before_ the
> +# @setup-time: amount of setup time in milliseconds _before_ the
> # iterations begin but _after_ the QMP command is issued. This is designed
> # to provide an accounting of any activities (such as RDMA pinning) which
> # may be expensive, but do not actually occur during the iterative
> # migration rounds themselves. (since 1.6)
Here's another place where wrapping now looks odd (short, followed by
multiple longer lines). Again, the effort of rewrapping lines is not
worth the churn (and it's actually easier to read diffs that _don't_
reflow text). So I'll just overlook wrapping oddities in the rest of
the patch, as inconsequential to the end result.
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
next prev parent reply other threads:[~2017-03-14 17:59 UTC|newest]
Thread overview: 137+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-13 6:18 [Qemu-devel] [PATCH for-2.9 00/47] qapi: Put type information back into QMP documentation Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 01/47] qapi: Factor QAPISchemaParser._include() out of .__init__() Markus Armbruster
2017-03-13 19:34 ` Eric Blake
2017-03-14 8:28 ` Marc-André Lureau
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 02/47] qapi: Make doc comments optional where we don't need them Markus Armbruster
2017-03-13 21:00 ` Eric Blake
2017-03-14 7:21 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 03/47] qapi: Back out doc comments added just to please qapi.py Markus Armbruster
2017-03-13 21:13 ` Eric Blake
2017-03-14 7:26 ` Markus Armbruster
2017-03-14 8:28 ` Marc-André Lureau
2017-03-14 9:45 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 04/47] docs/qapi-code-gen.txt: Drop confusing reference to 'gen' Markus Armbruster
2017-03-13 22:17 ` Eric Blake
2017-03-14 8:30 ` Marc-André Lureau
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 05/47] qapi: Have each QAPI schema declare its returns white-list Markus Armbruster
2017-03-13 22:41 ` Eric Blake
2017-03-14 7:40 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 06/47] qapi: Have each QAPI schema declare its name rule violations Markus Armbruster
2017-03-13 22:46 ` Eric Blake
2017-03-14 7:51 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 07/47] qapi: Clean up build of generated documentation Markus Armbruster
2017-03-14 15:55 ` Eric Blake
2017-03-15 7:08 ` Markus Armbruster
2017-03-15 11:53 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 08/47] tests/qapi-schema: Cover empty union base Markus Armbruster
2017-03-14 8:41 ` Marc-André Lureau
2017-03-14 15:56 ` Eric Blake
2017-03-15 7:11 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 09/47] qapi: Fix to reject empty union base gracefully Markus Armbruster
2017-03-14 8:40 ` Marc-André Lureau
2017-03-14 15:58 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 10/47] qapi2texi: Fix up output around #optional Markus Armbruster
2017-03-14 8:37 ` Marc-André Lureau
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 11/47] qapi: Avoid unwanted blank lines in QAPIDoc Markus Armbruster
2017-03-14 8:46 ` Marc-André Lureau
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 12/47] qapi/rocker: Fix up doc comment notes on optional members Markus Armbruster
2017-03-14 8:49 ` Marc-André Lureau
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 13/47] qapi: Fix QAPISchemaEnumType.is_implicit() for 'QType' Markus Armbruster
2017-03-14 16:03 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 14/47] qapi: Prepare for requiring more complete documentation Markus Armbruster
2017-03-14 16:08 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 15/47] qapi: Conjure up QAPIDoc.ArgSection for undocumented members Markus Armbruster
2017-03-14 17:16 ` Eric Blake
2017-03-15 7:12 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 16/47] qapi2texi: Convert to QAPISchemaVisitor Markus Armbruster
2017-03-14 17:31 ` Eric Blake
2017-03-15 7:14 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 17/47] qapi: The #optional tag is redundant, drop Markus Armbruster
2017-03-14 17:59 ` Eric Blake [this message]
2017-03-15 7:22 ` Markus Armbruster
2017-03-14 20:14 ` Eric Blake
2017-03-15 7:15 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 18/47] qapi: Use raw strings for regular expressions consistently Markus Armbruster
2017-03-14 18:00 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 19/47] qapi: Prefer single-quoted strings more consistently Markus Armbruster
2017-03-14 18:05 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 20/47] qapi2texi: Plainer enum value and member name formatting Markus Armbruster
2017-03-14 18:06 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 21/47] qapi2texi: Present the table of members more clearly Markus Armbruster
2017-03-14 18:08 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 22/47] qapi2texi: Explain enum value undocumentedness " Markus Armbruster
2017-03-14 19:00 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 23/47] qapi2texi: Don't hide undocumented members and arguments Markus Armbruster
2017-03-14 19:02 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 24/47] qapi2texi: Implement boxed argument documentation Markus Armbruster
2017-03-14 19:12 ` Eric Blake
2017-03-15 7:23 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 25/47] qapi2texi: Include member type in generated documentation Markus Armbruster
2017-03-14 12:42 ` Marc-André Lureau
2017-03-14 15:16 ` Markus Armbruster
2017-03-14 19:16 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 26/47] qapi2texi: Generate reference to base type members Markus Armbruster
2017-03-14 19:29 ` Eric Blake
2017-03-15 7:30 ` Markus Armbruster
2017-03-15 12:13 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 27/47] qapi2texi: Generate documentation for variant members Markus Armbruster
2017-03-14 19:36 ` Eric Blake
2017-03-15 7:36 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 28/47] qapi2texi: Generate descriptions for simple union tags Markus Armbruster
2017-03-14 19:54 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 29/47] qapi2texi: Use category "Object" for all object types Markus Armbruster
2017-03-14 19:56 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 30/47] tests/qapi-schema: Improve doc / expression mismatch coverage Markus Armbruster
2017-03-14 20:02 ` Eric Blake
2017-03-14 20:36 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 31/47] qapi: Fix detection of doc / expression mismatch Markus Armbruster
2017-03-14 20:35 ` Eric Blake
2017-03-15 7:39 ` Markus Armbruster
2017-03-15 12:14 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 32/47] qapi: Move detection of doc / expression name mismatch Markus Armbruster
2017-03-14 20:43 ` Eric Blake
2017-03-15 7:39 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 33/47] qapi: Improve error message on @NAME: in free-form doc Markus Armbruster
2017-03-14 20:46 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 34/47] qapi: Move empty doc section checking to doc parser Markus Armbruster
2017-03-13 6:23 ` Markus Armbruster
2017-03-15 1:40 ` Eric Blake
2017-03-15 7:44 ` Markus Armbruster
2017-03-15 1:37 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 35/47] tests/qapi-schema: Rename doc-bad-args to doc-bad-command-arg Markus Armbruster
2017-03-14 20:47 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 36/47] tests/qapi-schema: Improve coverage of bogus member docs Markus Armbruster
2017-03-14 20:55 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 37/47] qapi: Fix detection of bogus member documentation Markus Armbruster
2017-03-14 20:58 ` Eric Blake
2017-03-15 7:46 ` Markus Armbruster
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 38/47] qapi: Eliminate check_docs() and drop QAPIDoc.expr Markus Armbruster
2017-03-14 21:00 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 39/47] qapi: Drop unused variable events Markus Armbruster
2017-03-14 21:02 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 40/47] qapi: Simplify what gets stored in enum_types Markus Armbruster
2017-03-15 0:34 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 41/47] qapi: Factor add_name() calls out of the meta conditional Markus Armbruster
2017-03-15 0:39 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 42/47] qapi: enum_types is a list used like a dict, make it one Markus Armbruster
2017-03-15 0:47 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 43/47] qapi: struct_types " Markus Armbruster
2017-03-15 1:31 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 44/47] qapi: union_types " Markus Armbruster
2017-03-15 1:34 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 45/47] qapi: Drop unused .check_clash() parameter schema Markus Armbruster
2017-03-15 1:46 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 46/47] qapi: Make pylint a bit happier Markus Armbruster
2017-03-15 1:47 ` Eric Blake
2017-03-13 6:18 ` [Qemu-devel] [PATCH for-2.9 47/47] qapi: Fix a misleading parser error message Markus Armbruster
2017-03-15 1:48 ` Eric Blake
2017-03-13 10:32 ` [Qemu-devel] [PATCH for-2.9 00/47] qapi: Put type information back into QMP documentation Marc-André Lureau
2017-03-13 12:14 ` Markus Armbruster
2017-03-13 12:21 ` Marc-André Lureau
2017-03-13 13:12 ` Markus Armbruster
2017-03-14 13:22 ` Marc-André Lureau
2017-03-14 16:14 ` Markus Armbruster
2017-03-15 14:00 ` Marc-André Lureau
2017-03-14 13:24 ` Marc-André Lureau
2017-03-15 13:06 ` Markus Armbruster
2017-04-27 18:16 ` Eric Blake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c90b20a4-8180-4f73-6a99-bf71e124ea77@redhat.com \
--to=eblake@redhat.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).