public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: qemu-devel@nongnu.org
Cc: "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>, "John Snow" <jsnow@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>,
	"Markus Armbruster" <armbru@redhat.com>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Ani Sinha" <anisinha@redhat.com>
Subject: [PATCH 0/8] qapi: enforce section ordering
Date: Mon, 16 Mar 2026 14:25:59 -0400	[thread overview]
Message-ID: <20260316182608.148628-1-jsnow@redhat.com> (raw)

This is RFC quality and mostly meant for Markus to review, but if you're
curious about what we're up to, you're welcome to nose around :)

It's a hackish application of enforcing a strict source section ordering
in QAPIDoc and the accompanying patches that mend the source to respect
that order. The point of the series is to, ultimately, make it easier to
"inject" auto-generated documentation by enforcing a specific order to
sections so that it is easier to insert documentation that is missing or
can be implied from the source. A secondary goal is to more closely
align the source documentation ordering with what gets rendered on the
HTML documentation.

I am sending it to the list in this RFC state mostly to illustrate what
each specific imposition requires in terms of source doc changes, and as
a refresher for the specific restrictions I want to make to facilitate
the inliner feature.

I am not neccessarily married to any specific technique/implementation
for each specific restriction, but if it looks broadly OK to you
(Markus), I can work on any requested polish or corollary cleanups. If
you'd like to see a different approach, that's fine too. We may wish to
discuss the ability to add notes/addendums to sections and what syntax
would support that.

I had originally thought I'd work on the @oob project, but quickly
remembered that my approach to that feature required yet-another place
where we inject a doc section, and decided it would be best if I solved
"where do we inject this autogenerated section?" once and for all,
hence, you are getting this series first.

John Snow (8):
  qapi: differentiate "intro" and "details" sections
  qapi: prohibit 'details' sections between tagged sections
  qapi: add "Details:" disambiguation marker
  qapi: detect potentially semantically ambiguous intro paragraphs
  qapi: re-order QAPI doc block sections
  qapi: enforce doc block section ordering
  qapi: re-order 'since' sections to always be last
  qapi: enforce strict positioning for "Since:" section

 docs/interop/firmware.json      |   4 +-
 docs/interop/vhost-user.json    |   3 +-
 docs/sphinx/qapidoc.py          |   2 +-
 qapi/accelerator.json           |  12 +--
 qapi/acpi.json                  |   8 +-
 qapi/block-core.json            | 183 ++++++++++++++++----------------
 qapi/block-export.json          |  20 ++--
 qapi/block.json                 |  48 ++++-----
 qapi/char.json                  |  36 +++----
 qapi/control.json               |  14 +--
 qapi/dump.json                  |  16 +--
 qapi/machine-s390x.json         |  16 +--
 qapi/machine.json               | 144 +++++++++++++------------
 qapi/migration.json             | 102 ++++++++++--------
 qapi/misc-arm.json              |   6 +-
 qapi/misc-i386.json             |  40 ++++---
 qapi/misc.json                  |  68 ++++++------
 qapi/net.json                   |  42 ++++----
 qapi/pci.json                   |   4 +-
 qapi/qdev.json                  |  12 +--
 qapi/qom.json                   |  34 +++---
 qapi/replay.json                |  16 +--
 qapi/rocker.json                |  16 +--
 qapi/run-state.json             |  66 +++++++-----
 qapi/tpm.json                   |  12 +--
 qapi/trace.json                 |   8 +-
 qapi/transaction.json           |   4 +-
 qapi/ui.json                    |  76 +++++++------
 qapi/vfio.json                  |   4 +-
 qapi/virtio.json                |  46 ++++----
 qapi/yank.json                  |   2 +-
 scripts/qapi/parser.py          | 121 ++++++++++++++++++---
 tests/qapi-schema/doc-good.json |  12 +--
 tests/qapi-schema/doc-good.out  |  10 +-
 tests/qapi-schema/doc-good.txt  |  18 ++--
 35 files changed, 695 insertions(+), 530 deletions(-)

-- 
2.53.0




             reply	other threads:[~2026-03-16 18:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-16 18:25 John Snow [this message]
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
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=20260316182608.148628-1-jsnow@redhat.com \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=alex@shazbot.org \
    --cc=anisinha@redhat.com \
    --cc=armbru@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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox