On Wed, 17 May 2023 at 18:16, Richard Henderson
<richard.henderson@linaro.org> wrote:
> https://gitlab.com/qemu-project/qemu/-/jobs/4303506102#L3766
> https://gitlab.com/qemu-project/qemu/-/jobs/4303506050#L5856
> https://gitlab.com/qemu-project/qemu/-/jobs/4303506047#L3654
>
> /home/gitlab-runner/builds/Jpwtyaz7/0/qemu-project/qemu/docs/interop/qmp-spec.rst:71:Error
> in "code-block" directive:
> 1 argument(s) required, 0 supplied.
> .. code-block::
> { "QMP": { "version": json-object, "capabilities": json-array } }
Looks like whatever version of Sphinx this is enforces that
code-block comments specify a language. The system I tested on
didn't care.
In theory these blocks should be ".. code-block:: json", you
might think, but for me that results in
Warning, treated as error:
/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/docs/interop/qmp-spec.rst:71:Could
not lex literal_block as "json". Highlighting skipped.
(which I think means my system doesn't have the json lexer,
but who knows...)
So the simplest fix is to turn all the no-language code-blocks into
plain old literal blocks (the ones which are "QMP" format are fine,
but specifying QMP doesn't work for these blocks, because the QMP lexer
insists on seeing the -> and <- that indicate a command/response
direction). This should work as a fixup to the patch.
Markus, could I ask you to squash it in for the next round of this pullreq ?
diff --git a/docs/interop/qmp-spec.rst b/docs/interop/qmp-spec.rst
index 2609b3ff9b2..23ddcc853e5 100644
--- a/docs/interop/qmp-spec.rst
+++ b/docs/interop/qmp-spec.rst
@@ -68,7 +68,7 @@ ready for capabilities negotiation (for more
information refer to section
The greeting message format is:
-.. code-block::
+::
{ "QMP": { "version": json-object, "capabilities": json-array } }
@@ -94,13 +94,13 @@ Issuing Commands
The format for command execution is:
-.. code-block::
+::
{ "execute": json-string, "arguments": json-object, "id": json-value }
or
-.. code-block::
+::
{ "exec-oob": json-string, "arguments": json-object, "id": json-value }
@@ -164,7 +164,7 @@ Success
The format of a success response is:
-.. code-block::
+::
{ "return": json-value, "id": json-value }
@@ -183,7 +183,7 @@ Error
The format of an error response is:
-.. code-block::
+::
{ "error": { "class": json-string, "desc": json-string }, "id": json-value }
@@ -208,7 +208,7 @@ response. They are called "asynchronous events".
The format of asynchronous events is:
-.. code-block::
+::
{ "event": json-string, "data": json-object,
"timestamp": { "seconds": json-number, "microseconds": json-number } }
thanks
-- PMM