All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: qemu-devel@nongnu.org
Cc: Jason Wang <jasowang@redhat.com>
Subject: Re: Let's close member documentation gaps
Date: Tue, 26 Mar 2024 09:27:41 +0100	[thread overview]
Message-ID: <87r0fxs8hu.fsf@pond.sub.org> (raw)
In-Reply-To: <87il1aodow.fsf@pond.sub.org> (Markus Armbruster's message of "Mon, 25 Mar 2024 10:36:47 +0100")

Markus Armbruster <armbru@redhat.com> writes:

> If you're cc'ed, I have a bit of doc work for you.  Search for your
> name to find it.
>
> The QAPI generator forces you to document your stuff.  Except for
> commands, events, enum and object types listed in pragma
> documentation-exceptions, the generator silently defaults missing
> documentation to "Not documented".  Right now, we're using this loophole
> some 500 times.
>
> Most of the offenders are enumeration values.  Their meaning is perhaps
> easier to guess than the meaning of command arguments, member data, and
> object type members.  Ignoring enumerations leaves 62 offenders.  Let's
> examine them.

[...]

> = qapi/net.json
>
> * String
>
>   Lack of the @str: section produces an embarrassing "Not documented" in
>   the generated documentation.  I can post a patch to make it less
>   embarrassing.  I doubt we can make it actually good, as generic
>   wrapper types like this one have meaning only in the context they are
>   used.  Therefore, their meaning can be usefully explained only at
>   their uses, not their definition.

I decided not to.

String is used for NetdevUserOptions members @dnssearch, @hostfwd, and
@guestfwd.  NetdevUserOptions are the type-specific arguments of
netdev-add with type "user".

@dnssearch is documented tolerably well, although there's less
information than for the CLI equivalent in qemu-options.hx.

@hostfwd is not: the string format is not documented at all.  It's its
own mini-language.  The CLI equivalent in qemu-options.hx documents it.

Of course, encoding information in strings like that is bad practice in
QMP.  Probably not worth fixing now.

Same for @guestfwd.

These documentation deficiencies are more serious than the "Not
documented" for String.  Only fixing the latter seems not worthwhile.

Jason, thoughts?

[...]



      parent reply	other threads:[~2024-03-26  8:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25  9:36 Let's close member documentation gaps Markus Armbruster
2024-03-25 14:13 ` David Hildenbrand
2024-03-25 14:14   ` David Hildenbrand
2024-03-25 14:36     ` Markus Armbruster
2024-03-26  8:27 ` Markus Armbruster [this message]

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=87r0fxs8hu.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=jasowang@redhat.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 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.