From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Lukas Straub" <lukasstraub2@web.de>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Zhao Liu" <zhao1.liu@intel.com>,
"Jason Wang" <jasowang@redhat.com>,
"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Peter Xu" <peterx@redhat.com>, "Eric Blake" <eblake@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Fabiano Rosas" <farosas@suse.de>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Cédric Le Goater" <clg@redhat.com>,
qemu-block@nongnu.org,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
"Alex Williamson" <alex@shazbot.org>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Kevin Wolf" <kwolf@redhat.com>,
"Michael Roth" <michael.roth@amd.com>,
"Stefano Garzarella" <sgarzare@redhat.com>,
"Stefan Hajnoczi" <stefanha@redhat.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Jiri Pirko" <jiri@resnulli.us>,
"Yanan Wang" <wangyanan55@huawei.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Kashyap Chamarthy" <kchamart@redhat.com>,
"Hanna Reitz" <hreitz@redhat.com>,
"Ani Sinha" <anisinha@redhat.com>
Subject: Re: [PATCH 2/8] qapi: prohibit 'details' sections between tagged sections
Date: Fri, 20 Mar 2026 13:46:15 +0100 [thread overview]
Message-ID: <87h5qa7joo.fsf@pond.sub.org> (raw)
In-Reply-To: <20260316182608.148628-3-jsnow@redhat.com> (John Snow's message of "Mon, 16 Mar 2026 14:26:01 -0400")
John Snow <jsnow@redhat.com> writes:
> This patch prohibits plain documentation sections from appearing between
> "tagged" sections. The two existing uses of this pattern are patched
> out.
One real use, and one just for test coverage.
> This is being done primarily to ensure consistency between the source
> documents and the final, rendered HTML output. Because
> member/feature/returns/error sections will always appear in a visually
> grouped element in the HTML output, prohibiting plain paragraphs between
> those sections ensures ordering consistency between source and the final
> render.
Is consistency an actual problem being fixed, or a future problem being
avoided? I'm guessing the latter, based on my review of qom.json below.
> Additionally, prohibiting such "middle" text paragraphs allows us to
> classify all plain text sections as either "intro" or "details" sections,
> because these sections must either appear before structured/tagged
> sections ("intro") or afterwards ("details").
Huh?
The previous patch already classified all plain text sections as either
INTRO or DETAILS.
I think the paragraph would make sense if this patch came before the
previous one.
> This keeps the inlining algorithm simpler with fewer "splice" points
> when merging multiple documentation blocks.
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> qapi/qom.json | 4 ++--
> scripts/qapi/parser.py | 17 +++++++++++++++++
> tests/qapi-schema/doc-good.json | 4 ++--
> tests/qapi-schema/doc-good.out | 4 ++--
> tests/qapi-schema/doc-good.txt | 8 ++++----
> 5 files changed, 27 insertions(+), 10 deletions(-)
>
> diff --git a/qapi/qom.json b/qapi/qom.json
> index c653248f85d..1b47abd44e9 100644
> --- a/qapi/qom.json
> +++ b/qapi/qom.json
> @@ -243,12 +243,12 @@
> #
> # @typename: the type name of an object
> #
> +# Returns: a list describing object properties
> +#
> # .. note:: Objects can create properties at runtime, for example to
> # describe links between different devices and/or objects. These
> # properties are not included in the output of this command.
> #
> -# Returns: a list describing object properties
> -#
> # Since: 2.12
> ##
> { 'command': 'qom-list-properties',
Rendered documentation before the patch:
Command qom-list-properties (Since: 2.12)
List properties associated with a QOM object.
Arguments:
* typename (string) -- the type name of an object
Note:
Objects can create properties at runtime, for example to describe
links between different devices and/or objects. These properties
are not included in the output of this command.
Return:
[ObjectPropertyInfo] -- a list describing object properties
Afterwards:
Command qom-list-properties (Since: 2.12)
List properties associated with a QOM object.
Arguments:
* typename (string) -- the type name of an object
Return:
[ObjectPropertyInfo] -- a list describing object properties
Note:
Objects can create properties at runtime, for example to describe
links between different devices and/or objects. These properties
are not included in the output of this command.
Fine.
[Skipping the Python code in my first pass...]
> diff --git a/tests/qapi-schema/doc-good.json b/tests/qapi-schema/doc-good.json
> index fac13425b72..9103fed472e 100644
> --- a/tests/qapi-schema/doc-good.json
> +++ b/tests/qapi-schema/doc-good.json
> @@ -165,12 +165,12 @@
> # @cmd-feat1: a feature
> # @cmd-feat2: another feature
> #
> -# .. note:: @arg3 is undocumented
> -#
> # Returns: @Object
> #
> # Errors: some
> #
> +# .. note:: @arg3 is undocumented
> +#
> # TODO: frobnicate
> #
> # .. admonition:: Notes
> diff --git a/tests/qapi-schema/doc-good.out b/tests/qapi-schema/doc-good.out
> index 04e29e8d50f..6a0167ad580 100644
> --- a/tests/qapi-schema/doc-good.out
> +++ b/tests/qapi-schema/doc-good.out
> @@ -175,12 +175,12 @@ description starts on the same line
> a feature
> feature=cmd-feat2
> another feature
> - section=Details
> -.. note:: @arg3 is undocumented
> section=Returns
> @Object
> section=Errors
> some
> + section=Details
> +.. note:: @arg3 is undocumented
> section=Todo
> frobnicate
> section=Details
The Details section is still between tagged sections. The code
prohibiting it must have a hole :)
> diff --git a/tests/qapi-schema/doc-good.txt b/tests/qapi-schema/doc-good.txt
> index 74b73681d32..ded699dd596 100644
> --- a/tests/qapi-schema/doc-good.txt
> +++ b/tests/qapi-schema/doc-good.txt
> @@ -120,16 +120,16 @@ Command cmd (Since: 2.10)
>
> * **cmd-feat2** -- another feature
>
> - Note:
> -
> - "arg3" is undocumented
> -
> Return:
> "Object" -- "Object"
>
> Errors:
> some
>
> + Note:
> +
> + "arg3" is undocumented
> +
> Notes:
>
> * Lorem ipsum dolor sit amet
next prev parent reply other threads:[~2026-03-20 12:46 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-16 18:25 [PATCH 0/8] qapi: enforce section ordering John Snow
2026-03-16 18:26 ` [PATCH 1/8] qapi: differentiate "intro" and "details" sections John Snow
2026-03-20 12:24 ` Markus Armbruster
2026-03-20 17:20 ` John Snow
2026-03-23 8:15 ` Markus Armbruster
2026-03-16 18:26 ` [PATCH 2/8] qapi: prohibit 'details' sections between tagged sections John Snow
2026-03-20 12:46 ` Markus Armbruster [this message]
2026-03-20 17:40 ` John Snow
2026-03-23 8:41 ` Markus Armbruster
2026-03-20 13:46 ` Markus Armbruster
2026-03-20 17:42 ` John Snow
2026-03-16 18:26 ` [PATCH 3/8] qapi: add "Details:" disambiguation marker John Snow
2026-03-20 13:45 ` Markus Armbruster
2026-03-20 18:25 ` John Snow
2026-03-23 8:55 ` Markus Armbruster
2026-03-16 18:26 ` [PATCH 4/8] qapi: detect potentially semantically ambiguous intro paragraphs John Snow
2026-03-20 13:51 ` Markus Armbruster
2026-03-20 18:26 ` John Snow
2026-03-16 18:26 ` [PATCH 5/8] qapi: re-order QAPI doc block sections John Snow
2026-03-20 14:11 ` Markus Armbruster
2026-03-20 18:27 ` John Snow
2026-03-16 18:26 ` [PATCH 6/8] qapi: enforce doc block section ordering John Snow
2026-03-20 14:13 ` Markus Armbruster
2026-03-20 18:28 ` John Snow
2026-03-23 8:56 ` Markus Armbruster
2026-03-16 18:26 ` [PATCH 7/8] qapi: re-order 'since' sections to always be last John Snow
2026-03-20 14:23 ` Markus Armbruster
2026-03-20 20:47 ` John Snow
2026-03-16 18:26 ` [PATCH 8/8] qapi: enforce strict positioning for "Since:" 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=87h5qa7joo.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=alex@shazbot.org \
--cc=anisinha@redhat.com \
--cc=berrange@redhat.com \
--cc=clg@redhat.com \
--cc=eblake@redhat.com \
--cc=farosas@suse.de \
--cc=hreitz@redhat.com \
--cc=imammedo@redhat.com \
--cc=jasowang@redhat.com \
--cc=jiri@resnulli.us \
--cc=jsnow@redhat.com \
--cc=kchamart@redhat.com \
--cc=kwolf@redhat.com \
--cc=lukasstraub2@web.de \
--cc=marcandre.lureau@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mchehab+huawei@kernel.org \
--cc=michael.roth@amd.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=sgarzare@redhat.com \
--cc=stefanb@linux.vnet.ibm.com \
--cc=stefanha@redhat.com \
--cc=wangyanan55@huawei.com \
--cc=zhao1.liu@intel.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.