From: Markus Armbruster <armbru@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-devel@nongnu.org, Markus Armbruster <armbru@redhat.com>
Subject: Re: [PATCH v5 14/20] scripts/qapi: Remove texinfo generation support
Date: Fri, 04 Sep 2020 15:37:30 +0200 [thread overview]
Message-ID: <87y2lp64th.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <20200810195019.25427-15-peter.maydell@linaro.org> (Peter Maydell's message of "Mon, 10 Aug 2020 20:50:13 +0100")
Peter Maydell <peter.maydell@linaro.org> writes:
> We no longer use the generated texinfo format documentation,
> so delete the code that generates it, and the test case for
> the generation.
>
> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> Makefile | 1 -
> scripts/qapi-gen.py | 2 -
> scripts/qapi/doc.py | 302 ------------------------------
> scripts/qapi/gen.py | 7 -
> tests/Makefile.include | 15 +-
> tests/qapi-schema/doc-good.texi | 313 --------------------------------
> 6 files changed, 1 insertion(+), 639 deletions(-)
> delete mode 100644 scripts/qapi/doc.py
> delete mode 100644 tests/qapi-schema/doc-good.texi
>
> diff --git a/Makefile b/Makefile
> index 3df1cf68333..fc3ccc15030 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -626,7 +626,6 @@ qemu-keymap$(EXESUF): QEMU_CFLAGS += $(XKBCOMMON_CFLAGS)
> qapi-py = $(SRC_PATH)/scripts/qapi/__init__.py \
> $(SRC_PATH)/scripts/qapi/commands.py \
> $(SRC_PATH)/scripts/qapi/common.py \
> -$(SRC_PATH)/scripts/qapi/doc.py \
> $(SRC_PATH)/scripts/qapi/error.py \
> $(SRC_PATH)/scripts/qapi/events.py \
> $(SRC_PATH)/scripts/qapi/expr.py \
> diff --git a/scripts/qapi-gen.py b/scripts/qapi-gen.py
> index 4b03f7d53be..541e8c1f55d 100755
> --- a/scripts/qapi-gen.py
> +++ b/scripts/qapi-gen.py
> @@ -10,7 +10,6 @@ import re
> import sys
>
> from qapi.commands import gen_commands
> -from qapi.doc import gen_doc
> from qapi.events import gen_events
> from qapi.introspect import gen_introspect
> from qapi.schema import QAPIError, QAPISchema
> @@ -51,7 +50,6 @@ def main(argv):
> gen_commands(schema, args.output_dir, args.prefix)
> gen_events(schema, args.output_dir, args.prefix)
> gen_introspect(schema, args.output_dir, args.prefix, args.unmask)
> - gen_doc(schema, args.output_dir, args.prefix)
>
>
> if __name__ == '__main__':
> diff --git a/scripts/qapi/doc.py b/scripts/qapi/doc.py
> deleted file mode 100644
> index 7764de1e4bc..00000000000
> --- a/scripts/qapi/doc.py
> +++ /dev/null
[...]
> diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
> index bf5552a4e7f..ca66c82b5b8 100644
> --- a/scripts/qapi/gen.py
> +++ b/scripts/qapi/gen.py
> @@ -178,13 +178,6 @@ def ifcontext(ifcond, *args):
> arg.end_if()
>
>
> -class QAPIGenDoc(QAPIGen):
> -
> - def _top(self):
> - return (super()._top()
> - + '@c AUTOMATICALLY GENERATED, DO NOT MODIFY\n\n')
> -
> -
> class QAPISchemaMonolithicCVisitor(QAPISchemaVisitor):
>
> def __init__(self, prefix, what, blurb, pydoc):
> diff --git a/tests/Makefile.include b/tests/Makefile.include
> index c7e4646ded7..ec83efeaa63 100644
> --- a/tests/Makefile.include
> +++ b/tests/Makefile.include
> @@ -38,7 +38,6 @@ export SRC_PATH
> qapi-py = $(SRC_PATH)/scripts/qapi/__init__.py \
> $(SRC_PATH)/scripts/qapi/commands.py \
> $(SRC_PATH)/scripts/qapi/common.py \
> -$(SRC_PATH)/scripts/qapi/doc.py \
> $(SRC_PATH)/scripts/qapi/error.py \
> $(SRC_PATH)/scripts/qapi/events.py \
> $(SRC_PATH)/scripts/qapi/expr.py \
> @@ -501,16 +500,8 @@ tests/test-qapi-gen-timestamp: \
> $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
> -o tests -p "test-" $<, \
> "GEN","$(@:%-timestamp=%)")
> - @rm -f tests/test-qapi-doc.texi
> @>$@
>
> -tests/qapi-schema/doc-good.test.texi: $(SRC_PATH)/tests/qapi-schema/doc-good.json $(qapi-py)
> - $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-gen.py \
> - -o tests/qapi-schema -p "doc-good-" $<, \
> - "GEN","$@")
> - @mv tests/qapi-schema/doc-good-qapi-doc.texi $@
> - @rm -f tests/qapi-schema/doc-good-qapi-*.[ch] tests/qapi-schema/doc-good-qmp-*.[ch]
> -
> tests/qtest/dbus-vmstate1.h tests/qtest/dbus-vmstate1.c: tests/qtest/dbus-vmstate1-gen-timestamp ;
> tests/qtest/dbus-vmstate1-gen-timestamp: $(SRC_PATH)/tests/qtest/dbus-vmstate1.xml
> $(call quiet-command,$(GDBUS_CODEGEN) $< \
> @@ -891,10 +882,6 @@ check-tests/qapi-schema/frontend: $(addprefix $(SRC_PATH)/, $(check-qapi-schema-
> PYTHONIOENCODING=utf-8 $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py $^, \
> TEST, check-qapi-schema)
>
> -.PHONY: check-tests/qapi-schema/doc-good.texi
> -check-tests/qapi-schema/doc-good.texi: tests/qapi-schema/doc-good.test.texi
> - @diff -u $(SRC_PATH)/tests/qapi-schema/doc-good.texi $<
> -
We shouldn't just delete this test.
It is for checking the doc generator does what it should for "good"
input. "Bad" input is coverd by the other doc-*.json.
With the old doc generation system, the testing "good" input is
straightforward: generate Texinfo, diff to expected Texinfo, which is
committed to git.
This test has been invaliable when maintaining and extending doc.py.
With the new system, there is no ouput suitable for diffing, as the
various outputs all depend on the version of Sphinx.
Or is there? Is there a way to have Sphinx "unparse" its internal
representation of the input?
If not, we should still run doc-good.json through the doc generator to
at least catch errors. We still lose the ability to catch silent bad
output.
> .PHONY: check-decodetree
> check-decodetree:
> $(call quiet-command, \
> @@ -956,7 +943,7 @@ check-acceptance: check-venv $(TESTS_RESULTS_DIR) get-vm-images
> # Consolidated targets
>
> .PHONY: check-block check-qapi-schema check-qtest check-unit check check-clean get-vm-images
> -check-qapi-schema: check-tests/qapi-schema/frontend check-tests/qapi-schema/doc-good.texi
> +check-qapi-schema: check-tests/qapi-schema/frontend
> check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS))
> ifeq ($(CONFIG_TOOLS),y)
> check-block: $(patsubst %,check-%, $(check-block-y))
> diff --git a/tests/qapi-schema/doc-good.texi b/tests/qapi-schema/doc-good.texi
> deleted file mode 100644
> index 12808989ffb..00000000000
> --- a/tests/qapi-schema/doc-good.texi
> +++ /dev/null
[...]
next prev parent reply other threads:[~2020-09-04 13:38 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-10 19:49 [PATCH v5 00/20] Convert QAPI doc comments to generate rST instead of texinfo Peter Maydell
2020-08-10 19:50 ` [PATCH v5 01/20] qapi/migration.json: Fix indentation Peter Maydell
2020-08-10 19:50 ` [PATCH v5 02/20] qapi: Fix indentation, again Peter Maydell
2020-08-14 18:39 ` Richard Henderson
2020-08-10 19:50 ` [PATCH v5 03/20] qapi/block-core.json: Fix nbd-server-start docs Peter Maydell
2020-08-14 18:39 ` Richard Henderson
2020-08-10 19:50 ` [PATCH v5 04/20] qapi/qapi-schema.json: Put headers in their own doc-comment blocks Peter Maydell
2020-08-10 19:50 ` [PATCH v5 05/20] qapi/machine.json: Escape a literal '*' in doc comment Peter Maydell
2020-08-10 19:50 ` [PATCH v5 06/20] tests/qapi/doc-good.json: Prepare for qapi-doc Sphinx extension Peter Maydell
2020-09-04 8:10 ` Markus Armbruster
2020-09-04 12:17 ` Peter Maydell
2020-08-10 19:50 ` [PATCH v5 07/20] scripts/qapi: Move doc-comment whitespace stripping to doc.py Peter Maydell
2020-08-10 19:50 ` [PATCH v5 08/20] scripts/qapi/parser.py: improve doc comment indent handling Peter Maydell
2020-09-04 9:03 ` Markus Armbruster
2020-09-21 15:06 ` Peter Maydell
2020-09-22 7:27 ` Markus Armbruster
2020-09-22 11:48 ` Peter Maydell
2020-09-22 14:08 ` Markus Armbruster
2020-09-22 15:28 ` Peter Maydell
2020-08-10 19:50 ` [PATCH v5 09/20] docs/sphinx: Add new qapi-doc Sphinx extension Peter Maydell
2020-08-14 18:40 ` Richard Henderson
2020-09-04 12:29 ` Markus Armbruster
2020-09-21 18:06 ` Peter Maydell
2020-09-22 11:42 ` Markus Armbruster
2020-09-24 13:25 ` Peter Maydell
2020-09-24 16:30 ` Peter Maydell
2020-09-25 5:51 ` Markus Armbruster
2020-09-04 14:44 ` Markus Armbruster
2020-09-04 14:52 ` Peter Maydell
2020-09-21 16:50 ` Peter Maydell
2020-09-22 11:47 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 10/20] docs/interop: Convert qemu-ga-ref to rST Peter Maydell
2020-09-04 13:16 ` Markus Armbruster
2020-09-04 13:18 ` Peter Maydell
2020-09-21 15:30 ` Peter Maydell
2020-09-22 12:00 ` Markus Armbruster
2020-09-22 12:58 ` Peter Maydell
2020-09-22 14:13 ` Markus Armbruster
2020-09-22 14:21 ` Peter Maydell
2020-09-22 14:42 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 11/20] docs/interop: Convert qemu-qmp-ref " Peter Maydell
2020-08-10 19:50 ` [PATCH v5 12/20] qapi: Use rST markup for literal blocks Peter Maydell
2020-09-04 13:02 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 13/20] qga/qapi-schema.json: Add some headings Peter Maydell
2020-08-10 19:50 ` [PATCH v5 14/20] scripts/qapi: Remove texinfo generation support Peter Maydell
2020-09-04 13:37 ` Markus Armbruster [this message]
2020-09-24 18:14 ` Peter Maydell
2020-09-25 6:48 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 15/20] docs/devel/qapi-code-gen.txt: Update to new rST backend conventions Peter Maydell
2020-09-17 9:24 ` Markus Armbruster
2020-08-10 19:50 ` [PATCH v5 16/20] Makefile: Remove redundant Texinfo related rules Peter Maydell
2020-08-10 19:50 ` [PATCH v5 17/20] scripts/texi2pod: Delete unused script Peter Maydell
2020-08-10 19:50 ` [PATCH v5 18/20] Remove Texinfo related files from .gitignore and git.orderfile Peter Maydell
2020-08-10 19:50 ` [PATCH v5 19/20] configure: Drop texinfo requirement Peter Maydell
2020-08-10 19:50 ` [PATCH v5 20/20] Remove texinfo dependency from docker and CI configs Peter Maydell
2020-08-27 11:25 ` [PATCH v5 00/20] Convert QAPI doc comments to generate rST instead of texinfo Peter Maydell
2020-09-04 14:34 ` Markus Armbruster
2020-09-04 14:48 ` Peter Maydell
2020-09-04 15:54 ` Markus Armbruster
2020-09-04 16:05 ` Peter Maydell
2020-09-24 14:13 ` Peter Maydell
2020-09-24 14:49 ` 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=87y2lp64th.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=peter.maydell@linaro.org \
--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.