qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: John Snow <jsnow@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: qemu-devel@nongnu.org, "Zhenwei Pi" <pizhenwei@bytedance.com>,
	"Stefan Berger" <stefanb@linux.vnet.ibm.com>,
	"Jiri Pirko" <jiri@resnulli.us>,
	"Ani Sinha" <anisinha@redhat.com>,
	"Jason Wang" <jasowang@redhat.com>,
	"Mads Ynddal" <mads@ynddal.dk>, "Zhao Liu" <zhao1.liu@intel.com>,
	"Eduardo Habkost" <eduardo@habkost.net>,
	"Kashyap Chamarthy" <kchamart@redhat.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Hanna Reitz" <hreitz@redhat.com>,
	"Cleber Rosa" <crosa@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	qemu-block@nongnu.org, "Igor Mammedov" <imammedo@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Eric Blake" <eblake@redhat.com>,
	"Gonglei (Arei)" <arei.gonglei@huawei.com>,
	"Lukas Straub" <lukasstraub2@web.de>,
	"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	"Vladimir Sementsov-Ogievskiy" <vsementsov@yandex-team.ru>,
	"Fan Ni" <fan.ni@samsung.com>,
	"Daniel P. Berrangé" <berrange@redhat.com>,
	"Peter Xu" <peterx@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Yanan Wang" <wangyanan55@huawei.com>,
	"Stefano Garzarella" <sgarzare@redhat.com>,
	"Alex Williamson" <alex.williamson@redhat.com>,
	"Fabiano Rosas" <farosas@suse.de>,
	"Jonathan Cameron" <jonathan.cameron@huawei.com>,
	"Cédric Le Goater" <clg@redhat.com>,
	"Michael Roth" <michael.roth@amd.com>,
	"Kevin Wolf" <kwolf@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Konstantin Kostiuk" <kkostiuk@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>
Subject: Re: [PATCH v2 2/3] docs: remove legacy QAPI manual generator
Date: Tue, 17 Jun 2025 15:54:07 -0400	[thread overview]
Message-ID: <CAFn=p-bwa7ETp9znOQ_zMD5icJz2e7=Lj+uLWNctADwLrtqnhA@mail.gmail.com> (raw)
In-Reply-To: <87ldprho83.fsf@pond.sub.org>

[-- Attachment #1: Type: text/plain, Size: 9321 bytes --]

On Mon, Jun 16, 2025 at 8:20 AM Markus Armbruster <armbru@redhat.com> wrote:

> John Snow <jsnow@redhat.com> writes:
>
> > Thanks for your service!
> >
> > Remove the old qapidoc and the option to enable the transmogrifier,
> > leaving the "transmogrifier" as the ONLY qapi doc generator. This in
> > effect also converts the QAPI test to use the new documentation
> > generator, too.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
>
> Fails "make check", because tests/qapi-schema/doc-good.txt needs an
> update.
>
> Unfortunately, the diff of the update is less than useful.  To make
> sense of what changes, I split doc-good.txt into parts before and after,
> and diffed those.
>
>
>   diff -rupw o/01 n/01
>   --- o/01      2025-06-16 13:53:05.036940854 +0200
>   +++ n/01      2025-06-16 13:49:07.167435996 +0200
>   @@ -1,11 +1,13 @@
>    Section
>    *******
>
>   +Just text, no heading.
>   +
>
> Looks like a bug fix.  Needs a mention in the commit message then.
>

I think before, these sections just got ... discarded? but with no special
formatting, they just get copied through. You could call it a bugfix, you
could call it an unintentional side effect.

For my money, I think it's fine to allow free-form docs to have any
arbitrary content. If it produces bad results, don't do it, then. Fewer
constraints = less code.


>
>    Subsection
>    ==========
>
>   -*with emphasis* "var" {in braces}
>   +*with emphasis* @var {in braces}
>
> Rendering of @references changes.  Okay.
>

Unintentional. Freeform sections are handled outside of "visit_sections",
because they are not attached to an entity, and so the @references
rendering is missed. Bug, I'll fix it.


>
>    * List item one
>
>   @@ -35,4 +37,3 @@ Example:
>
>    -> in <- out Examples: - *verbatim* - {braces}
>
>   -
>   diff -rupw o/02 n/02
>   --- o/02      2025-06-16 13:53:17.133712123 +0200
>   +++ n/02      2025-06-16 13:49:21.024174424 +0200
>   @@ -1,32 +1,15 @@
>   -"Enum" (Enum)
>   --------------
>   +Enum Enum
>   +    *Availability*: "IFCOND"
>
>   +   Values:
>   +      * **one** -- The _one_ {and only}, description on the same line
>
>   -Values
>   -~~~~~~
>   +      * **two** -- Not documented
>
>   -"one" (**If: **"IFONE")
>
> Member conditional is lost.  Known issue; see commit dbf51d15fdb.
>
>   -   The _one_ {and only}, description on the same line
>   +   Features:
>   +      * **enum-feat** -- Also _one_ {and only}
>
>   -"two"
>   -   Not documented
>   -
>   -
>   -Features
>   -~~~~~~~~
>   -
>   -"enum-feat"
>   -   Also _one_ {and only}
>   -
>   -"enum-member-feat"
>   -   a member feature
>   +      * **enum-member-feat** -- a member feature
>
>    "two" is undocumented
>
>   -
>   -If
>   -~~
>   -
>   -"IFCOND"
>   -
>   -
>   diff -rupw o/03 n/03
>   --- o/03      2025-06-16 13:53:27.556514971 +0200
>   +++ n/03      2025-06-16 13:50:44.582595942 +0200
>   @@ -1,17 +1,7 @@
>   -"Base" (Object)
>   ----------------
>   -
>   -
>   -Members
>   -~~~~~~~
>   -
>   -"base1": "Enum"
>   -   description starts on a new line, minimally indented
>   -
>   -
>   -If
>   -~~
>   -
>   -"IFALL1 and IFALL2"
>   +Object Base
>   +    *Availability*: "IFALL1 and IFALL2"
>
>   +   Members:
>   +      * **base1** ("Enum") -- description starts on a new line,
>   +        minimally indented
>
>   diff -rupw o/04 n/04
>   --- o/04      2025-06-16 13:53:39.356291772 +0200
>   +++ n/04      2025-06-16 13:50:54.486408751 +0200
>   @@ -1,5 +1,4 @@
>   -"Variant1" (Object)
>   --------------------
>   +Object Variant1
>
>    A paragraph
>
>   @@ -7,21 +6,11 @@ Another paragraph
>
>    "var1" is undocumented
>
>   +   Members:
>   +      * **var1** ("string") -- Not documented
>
>   -Members
>   -~~~~~~~
>   -
>   -"var1": "string" (**If: **"IFSTR")
>
> Likewise.
>
>   -   Not documented
>   -
>   -
>   -Features
>   -~~~~~~~~
>   -
>   -"variant1-feat"
>   -   a feature
>   -
>   -"member-feat"
>   -   a member feature
>   +   Features:
>   +      * **variant1-feat** -- a feature
>
>   +      * **member-feat** -- a member feature
>
>   diff -rupw o/05 n/05
>   --- o/05      2025-06-16 13:53:43.429214731 +0200
>   +++ n/05      2025-06-16 13:51:05.247205330 +0200
>   @@ -1,4 +1,2 @@
>   -"Variant2" (Object)
>   --------------------
>   -
>   +Object Variant2
>
>   diff -rupw o/06 n/06
>   --- o/06      2025-06-16 13:53:48.461119551 +0200
>   +++ n/06      2025-06-16 13:51:10.990096739 +0200
>   @@ -1,19 +1,12 @@
>   -"Object" (Object)
>   ------------------
>   +Object Object
>
>   +   Members:
>   +      * The members of "Base".
>
>   -Members
>   -~~~~~~~
>   +      * When "base1" is "one": The members of "Variant1".
>
>   -The members of "Base"
>   -The members of "Variant1" when "base1" is ""one""
>   -The members of "Variant2" when "base1" is ""two"" (**If: **"IFONE or
>   -IFTWO")
>
> Likewise.
>
>   -
>   -Features
>   -~~~~~~~~
>   -
>   -"union-feat1"
>   -   a feature
>   +      * When "base1" is "two": The members of "Variant2".
>
>   +   Features:
>   +      * **union-feat1** -- a feature
>
>   diff -rupw o/07 n/07
>   --- o/07      2025-06-16 13:53:55.988977158 +0200
>   +++ n/07      2025-06-16 13:51:16.869985559 +0200
>   @@ -1,28 +1,13 @@
>   -"Alternate" (Alternate)
>   ------------------------
>   +Alternate Alternate
>   +    *Availability*: "not (IFONE or IFTWO)"
>
>   +   Alternatives:
>   +      * **i** ("int") -- description starts on the same line remainder
>   +        indented the same "b" is undocumented
>
>   -Members
>   -~~~~~~~
>   +      * **b** ("boolean") -- Not documented
>
>   -"i": "int"
>   -   description starts on the same line remainder indented the same "b"
>   -   is undocumented
>   -
>   -"b": "boolean"
>   -   Not documented
>   -
>   -
>   -Features
>   -~~~~~~~~
>   -
>   -"alt-feat"
>   -   a feature
>   -
>   -
>   -If
>   -~~
>   -
>   -"not (IFONE or IFTWO)"
>   +   Features:
>   +      * **alt-feat** -- a feature
>
>
>   diff -rupw o/08 n/08
>   --- o/08      2025-06-16 13:54:11.692680115 +0200
>   +++ n/08      2025-06-16 13:51:35.957624638 +0200
>   @@ -1,47 +1,29 @@
>    Another subsection
>    ==================
>
>   +Command cmd (Since: 2.10)
>
>   -"cmd" (Command)
>   ----------------
>   +   Arguments:
>   +      * **arg1** ("int") -- description starts on a new line, indented
>
>   +      * **arg2** ("string", *optional*) -- description starts on the
>   +        same line remainder indented differently
>
>   -Arguments
>   -~~~~~~~~~
>   +      * **arg3** ("boolean") -- Not documented
>
>   -"arg1": "int"
>   -   description starts on a new line, indented
>   +   Features:
>   +      * **cmd-feat1** -- a feature
>
>   -"arg2": "string" (optional)
>   -   description starts on the same line remainder indented differently
>   -
>   -"arg3": "boolean"
>   -   Not documented
>   -
>   -
>   -Features
>   -~~~~~~~~
>   -
>   -"cmd-feat1"
>   -   a feature
>   -
>   -"cmd-feat2"
>   -   another feature
>   +      * **cmd-feat2** -- another feature
>
>    Note:
>
>      "arg3" is undocumented
>
>   +   Return:
>   +      "Object" -- "Object"
>
>   -Returns
>   -~~~~~~~
>   -
>   -"Object"
>   -
>   -
>   -Errors
>   -~~~~~~
>   -
>   +   Errors:
>    * some
>
>    Notes:
>   @@ -68,10 +50,3 @@ Examples:
>    Note::
>       Ceci n'est pas une note
>
>   -
>   -Since
>   -~~~~~
>   -
>   -2.10
>   -
>   -
>   diff -rupw o/09 n/09
>   --- o/09      2025-06-16 14:11:32.819939859 +0200
>   +++ n/09      2025-06-16 13:51:43.469482599 +0200
>   @@ -1,22 +1,14 @@
>   -"cmd-boxed" (Command)
>   ----------------------
>   +Command cmd-boxed
>
>    If you're bored enough to read this, go see a video of boxed cats
>
>   +   Arguments:
>   +      * The members of "Object".
>
>   -Arguments
>   -~~~~~~~~~
>   +   Features:
>   +      * **cmd-feat1** -- a feature
>
>   -The members of "Object"
>   -
>   -Features
>   -~~~~~~~~
>   -
>   -"cmd-feat1"
>   -   a feature
>   -
>   -"cmd-feat2"
>   -   another feature
>   +      * **cmd-feat2** -- another feature
>
>    Example::
>
>   @@ -24,4 +16,3 @@ Example::
>
>       <- ... has no title ...
>
>   -
>   diff -rupw o/10 n/10
>   --- o/10      2025-06-16 14:11:35.771883514 +0200
>   +++ n/10      2025-06-16 13:51:46.653422395 +0200
>   @@ -1,14 +1,7 @@
>   -"EVT_BOXED" (Event)
>   --------------------
>   +Event EVT_BOXED
>
>   +   Members:
>   +      * The members of "Object".
>
>   -Arguments
>   -~~~~~~~~~
>   -
>   -The members of "Object"
>   -
>   -Features
>   -~~~~~~~~
>   -
>   -"feat3"
>   -   a feature
>   +   Features:
>   +      * **feat3** -- a feature
>
> The only unexpected change is the first hunk.


Some of these look a little silly, let me see what I can do ... The IFCOND
stuff is a known issue, and I believe is best tackled in conjunction with
your project to add conditional documentation entities.

Everything else, I'll review and see what can be improved upon if anything.

[-- Attachment #2: Type: text/html, Size: 12411 bytes --]

  reply	other threads:[~2025-06-17 19:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-12 22:10 [PATCH v2 0/3] docs: remove legacy qapidoc John Snow
2025-06-12 22:10 ` [PATCH v2 1/3] docs: fix errors formatting in tests/qapi-schema/doc-good John Snow
2025-06-16 11:36   ` Markus Armbruster
2025-06-16 21:47     ` John Snow
2025-06-12 22:10 ` [PATCH v2 2/3] docs: remove legacy QAPI manual generator John Snow
2025-06-16 12:20   ` Markus Armbruster
2025-06-17 19:54     ` John Snow [this message]
2025-06-18  6:21       ` Markus Armbruster
2025-06-12 22:10 ` [PATCH v2 3/3] docs: remove special parsing for freeform sections John Snow
2025-06-16 12:35   ` Markus Armbruster

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='CAFn=p-bwa7ETp9znOQ_zMD5icJz2e7=Lj+uLWNctADwLrtqnhA@mail.gmail.com' \
    --to=jsnow@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=alex.williamson@redhat.com \
    --cc=anisinha@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=berrange@redhat.com \
    --cc=clg@redhat.com \
    --cc=crosa@redhat.com \
    --cc=eblake@redhat.com \
    --cc=eduardo@habkost.net \
    --cc=fan.ni@samsung.com \
    --cc=farosas@suse.de \
    --cc=hreitz@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=jasowang@redhat.com \
    --cc=jiri@resnulli.us \
    --cc=jonathan.cameron@huawei.com \
    --cc=kchamart@redhat.com \
    --cc=kkostiuk@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lukasstraub2@web.de \
    --cc=mads@ynddal.dk \
    --cc=marcandre.lureau@redhat.com \
    --cc=marcel.apfelbaum@gmail.com \
    --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=pizhenwei@bytedance.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=sgarzare@redhat.com \
    --cc=stefanb@linux.vnet.ibm.com \
    --cc=stefanha@redhat.com \
    --cc=vsementsov@yandex-team.ru \
    --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;
as well as URLs for NNTP newsgroup(s).