From: Markus Armbruster <armbru@redhat.com>
To: John Snow <jsnow@redhat.com>
Cc: qemu-devel@nongnu.org, "Michael Roth" <michael.roth@amd.com>,
"Eric Blake" <eblake@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Mauro Carvalho Chehab" <mchehab+huawei@kernel.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@oss.qualcomm.com>,
"Igor Mammedov" <imammedo@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Ani Sinha" <anisinha@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v2 05/13] qapi/docs: adjust stub member insertion algorithm
Date: Mon, 04 May 2026 13:20:48 +0200 [thread overview]
Message-ID: <87o6iva0a7.fsf@pond.sub.org> (raw)
In-Reply-To: <20260429192611.1581223-6-jsnow@redhat.com> (John Snow's message of "Wed, 29 Apr 2026 15:26:03 -0400")
I'm feeling dense again. Please be patient with me.
John Snow <jsnow@redhat.com> writes:
> A forthcoming patch removes the implicit PLAIN section that always
> starts a QAPIDoc section list. Further future changes begin converting
> "PLAIN" sections to "INTRO" sections. To accommodate this, the insertion
> algorithm that places stub and dummy members must be adjusted to cope.
What are the stub and dummy members?
> This algorithm can handle zero-or-more PLAIN *or* INTRO sections at the
> beginning of a QAPIDoc object.
The revised algorithm, I presume.
What's the structure of its valid input before and after this patch?
> Since we have three places that need to insert stub members, take the
> opportunity to unify and deduplicate this code.
Three? I can only see two: Transmogrifier.visit_sections() and
QAPIDoc.connect_member().
>
> Signed-off-by: John Snow <jsnow@redhat.com>
> ---
> docs/sphinx/qapidoc.py | 36 ++++++++---------
> scripts/qapi/parser.py | 90 +++++++++++++++++++++++++++---------------
> 2 files changed, 75 insertions(+), 51 deletions(-)
>
> diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
> index 1f7c15b7075..70ab9cdc214 100644
> --- a/docs/sphinx/qapidoc.py
> +++ b/docs/sphinx/qapidoc.py
> @@ -349,30 +349,32 @@ def _get_target(
> )
>
> def visit_sections(self, ent: QAPISchemaDefinition) -> None:
> + # Generate a placeholder right after the member section(s) which
> + # will be used to generate documentation for "The members of..."
> + # pointers in the rendered document.
> + # This is a temporary hack until the inliner is merged.
> + if ent.doc:
> + ent.doc.append_member_stub(
> + QAPIDoc.ArgSection(
> + ent.doc.info, QAPIDoc.Kind.MEMBER, "q_dummy"
> + )
> + )
> +
This hack is of the nastier sort: passing a QAPISchema to the doc
generator modifies it.
Would it be possible to add this dummy always in QAPISchema? Any
drawbacks?
[Remainder left for later...]
next prev parent reply other threads:[~2026-05-04 11:21 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 19:25 [PATCH v2 00/13] qapi: add formal "intro" section John Snow
2026-04-29 19:25 ` [PATCH v2 01/13] tests/qapi: generate output in source order John Snow
2026-05-04 9:50 ` Markus Armbruster
2026-05-04 17:55 ` John Snow
2026-04-29 19:26 ` [PATCH v2 02/13] qapi/docs: remove unused QAPIDoc subsection members John Snow
2026-05-04 9:51 ` Markus Armbruster
2026-04-29 19:26 ` [PATCH v2 03/13] qapi/docs: make remaining subsection members "private" John Snow
2026-05-04 9:54 ` Markus Armbruster
2026-05-04 18:07 ` John Snow
2026-04-29 19:26 ` [PATCH v2 04/13] qapi/docs: add "Intro" section John Snow
2026-04-29 19:26 ` [PATCH v2 05/13] qapi/docs: adjust stub member insertion algorithm John Snow
2026-05-04 11:20 ` Markus Armbruster [this message]
2026-05-04 18:30 ` John Snow
2026-05-05 13:54 ` Markus Armbruster
2026-05-04 18:33 ` John Snow
2026-04-29 19:26 ` [PATCH v2 06/13] qapi/docs: remove implicit Plain section John Snow
2026-04-29 19:26 ` [PATCH v2 07/13] qapi/docs: add "Intro" section parsing John Snow
2026-05-04 11:57 ` Markus Armbruster
2026-05-04 18:44 ` John Snow
2026-05-05 13:30 ` Markus Armbruster
2026-04-29 19:26 ` [PATCH v2 08/13] qapi/docs: Add rendering for INTRO sections John Snow
2026-05-04 12:05 ` Markus Armbruster
2026-05-12 21:13 ` John Snow
2026-05-13 6:25 ` Markus Armbruster
2026-04-29 19:26 ` [PATCH v2 09/13] qapi: convert intro sections for accelerator.json John Snow
2026-04-29 19:26 ` [PATCH v2 10/13] qapi: convert intro sections for acpi-hest.json John Snow
2026-04-29 19:26 ` [PATCH v2 11/13] qapi: convert intro sections for acpi.json John Snow
2026-04-29 19:26 ` [PATCH v2 12/13] qapi: convert intro sections for audio.json John Snow
2026-04-29 19:26 ` [PATCH v2 13/13] rfc: intro starts on next line 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=87o6iva0a7.fsf@pond.sub.org \
--to=armbru@redhat.com \
--cc=anisinha@redhat.com \
--cc=eblake@redhat.com \
--cc=imammedo@redhat.com \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=marcandre.lureau@redhat.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=philmd@linaro.org \
--cc=pierrick.bouvier@oss.qualcomm.com \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.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