All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Victor Toso <victortoso@redhat.com>
Cc: Eric Blake <eblake@redhat.com>, John Snow <jsnow@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>
Subject: "Future directions" vs. "TODO" in doc comments (was: [PATCH 01/14] qapi: BlockExportRemoveMode: move comments to TODO)
Date: Mon, 28 Mar 2022 09:46:40 +0200	[thread overview]
Message-ID: <87lewubjtr.fsf_-_@pond.sub.org> (raw)
In-Reply-To: <20220325204724.g4utzgpmqk4skgm6@tapioca> (Victor Toso's message of "Fri, 25 Mar 2022 21:47:24 +0100")

Victor Toso <victortoso@redhat.com> writes:

> Hi,
>
> On Fri, Mar 25, 2022 at 11:11:23AM -0400, John Snow wrote:
>> On Fri, Mar 25, 2022, 8:33 AM Markus Armbruster <armbru@redhat.com> wrote:

[...]

>> > Doc comments embed user documentation in the source code.  The doc
>> > generator extracts it.
>> >
>> > TODOs are generally for developers.  Should the doc generator suppress
>> > TODO sections?
>> 
>> Needs an audit to make sure we're using it consistently with
>> that semantic, but broadly it's probably a good idea to squelch
>> "internal" todos, yes.
>> 
>> Things like "Watch out, were definitely gonna deprecate this
>> soon probably maybe!" can stay outside of the TODO section.
>> (Sometimes heads up are legitimate, even if most won't read
>> them. the faithful and diligent will be rewarded with painless
>> upgrades.)

This is "future directions", not quite the same as "TODO".

Would a section tag "Future directions" make sense?

> There are 5 TODO sections in QAPI (including this patch):

Let me try to sort them into "TODO" and "future directions" buckets.
The former are of interest for developers only, and thus should be
elided from documentation meant for users.

>  qapi/block-export.json:222:# TODO: Potential additional modes to be added in the future:

Do we believe our thoughts on evolving of this enum are relevant for
users of the affected QMP commands (nbd-server-remove and
block-export-del)?

If yes, it's "future directions".

>  qapi/introspect.json:300:# TODO: @success-response (currently irrelevant, because it's QGA, not QMP)

As phrased, this is only useful for developers, and even for them, it's
rather terse.

If we add introspection to QGA, we'll want to add a @success-response
member.

So, if we intend to add introspection to QGA, *and* we think current
users of (QMP-only) introspection need to know about a future addition
of @success-response, then this should be rephrased as "future
directions".

I doubt it.

>  qapi/machine.json:913:# TODO: Better documentation; currently there is none.

Clearly TODO.

>  qapi/migration.json:933:# TODO either fuse back into MigrationParameters, or make

Clearly TODO.  Note that this one is *not* in a doc comment, and does
*not* appear in generated documentation.

Once we have concrete plans on how to address the TODO, these plans may
motivate "future directions", namely if they involve user-visible change
users need to know about in advance.

>  qapi/qdev.json:70:# TODO: This command effectively bypasses QAPI completely due to its

Likewise.

I think this shows that we have a few comments just for developers in
the middle of user documentation.

We could simply keep these outside doc comments, like the TODO in
qapi/migration.json.

This can occasionally be awkward.  For instance, TODO @success-response
is right where @success-response ought to be.  Moving it outside the doc
comment would lose that.  Not the end of the world, just awkward.

If this annoys us enough, we could provide means to let us have elide
parts of doc comments from generated docs.  The simplest one is probably
eliding certain sections, say the TODO sections.

Thoughts?

[...]



  reply	other threads:[~2022-03-28  7:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-24 17:50 [PATCH 00/14] Fix some qapi examples and a TODO section Victor Toso
2022-03-24 17:50 ` [PATCH 01/14] qapi: BlockExportRemoveMode: move comments to TODO Victor Toso
2022-03-24 20:34   ` John Snow
2022-03-25 20:35     ` Victor Toso
2022-03-25 12:33   ` Markus Armbruster
2022-03-25 15:11     ` John Snow
2022-03-25 20:47       ` Victor Toso
2022-03-28  7:46         ` Markus Armbruster [this message]
2022-03-29 16:31           ` "Future directions" vs. "TODO" in doc comments (was: [PATCH 01/14] qapi: BlockExportRemoveMode: move comments to TODO) John Snow
2022-03-24 17:50 ` [PATCH 02/14] qapi: fix example of BLOCK_IMAGE_CORRUPTED event Victor Toso
2022-03-24 19:15   ` John Snow
2022-03-24 20:40     ` John Snow
2022-03-25 12:43       ` Markus Armbruster
2022-03-25 20:59         ` Victor Toso
2022-03-25 21:40           ` John Snow
2022-03-24 17:50 ` [PATCH 03/14] qapi: fix example of BLOCK_IO_ERROR event Victor Toso
2022-03-24 20:47   ` John Snow
2022-03-25 20:52     ` Victor Toso
2022-03-24 17:50 ` [PATCH 04/14] qapi: fix example of BLOCK_JOB_PENDING event Victor Toso
2022-03-24 20:49   ` John Snow
2022-03-25 12:48   ` Markus Armbruster
2022-03-24 17:50 ` [PATCH 05/14] qapi: fix example of DUMP_COMPLETED event Victor Toso
2022-03-24 20:53   ` John Snow
2022-03-25 12:53     ` Markus Armbruster
2022-03-25 21:02       ` Victor Toso
2022-03-24 17:50 ` [PATCH 06/14] qapi: fix example of MEMORY_DEVICE_SIZE_CHANGE event Victor Toso
2022-03-24 20:57   ` John Snow
2022-03-25 13:00     ` Markus Armbruster
2022-03-25 21:03     ` Victor Toso
2022-03-24 17:50 ` [PATCH 07/14] qapi: fix example of UNPLUG_PRIMARY event Victor Toso
2022-03-24 21:01   ` John Snow
2022-03-24 17:50 ` [PATCH 08/14] qapi: fix example of FAILOVER_NEGOTIATED event Victor Toso
2022-03-24 21:05   ` John Snow
2022-03-24 17:50 ` [PATCH 09/14] qapi: run-state examples: add missing member Victor Toso
2022-03-24 21:12   ` John Snow
2022-03-24 17:50 ` [PATCH 10/14] qapi: run-state examples: add missing timestamp Victor Toso
2022-03-24 21:16   ` John Snow
2022-03-24 17:50 ` [PATCH 11/14] qapi: fix example of MEMORY_FAILURE Victor Toso
2022-03-24 21:28   ` John Snow
2022-03-24 17:50 ` [PATCH 12/14] qapi: ui examples: add missing websocket member Victor Toso
2022-03-24 21:22   ` John Snow
2022-03-24 17:50 ` [PATCH 13/14] qapi: fix example of ACPI_DEVICE_OST event Victor Toso
2022-03-24 21:31   ` John Snow
2022-03-24 17:50 ` [PATCH 14/14] qapi: fix example of dump-guest-memory Victor Toso
2022-03-24 21:31   ` John Snow
2022-03-24 21:33 ` [PATCH 00/14] Fix some qapi examples and a TODO section John Snow

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=87lewubjtr.fsf_-_@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=victortoso@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.