From: Kevin Wolf <kwolf@redhat.com>
To: Markus Armbruster <armbru@redhat.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@gmail.com>,
QEMU <qemu-devel@nongnu.org>,
"open list:Block layer core" <qemu-block@nongnu.org>
Subject: Re: [PATCH 3/6] qapi: Remove wrapper struct for simple unions
Date: Fri, 23 Oct 2020 16:06:17 +0200 [thread overview]
Message-ID: <20201023140617.GD4793@merkur.fritz.box> (raw)
In-Reply-To: <87h7qlp0nz.fsf@dusky.pond.sub.org>
Am 23.10.2020 um 14:49 hat Markus Armbruster geschrieben:
> In addition to that, I get
>
> /usr/bin/sphinx-build-3 -Dversion=5.1.50 -Drelease= -Ddepfile=docs/interop.d -Ddepfile_stamp=docs/interop.stamp -b html -d /work/armbru/qemu/bld-x86/docs/interop.p /work/armbru/qemu/docs/interop /work/armbru/qemu/bld-x86/docs/interop
> Running Sphinx v2.2.2
> building [mo]: targets for 0 po files that are out of date
> building [html]: targets for 12 source files that are out of date
> updating environment: [new config] 12 added, 0 changed, 0 removed
> reading sources... [ 8%] bitmaps
> reading sources... [ 16%] dbus
> reading sources... [ 25%] dbus-vmstate
> reading sources... [ 33%] index
> reading sources... [ 41%] live-block-operations
> reading sources... [ 50%] pr-helper
> reading sources... [ 58%] qemu-ga
> reading sources... [ 66%] qemu-ga-ref
> reading sources... [ 75%] qemu-qmp-ref
>
> Exception occurred:
> File "/work/armbru/qemu/docs/sphinx/qapidoc.py", line 187, in _nodes_for_members
> assert not v.type.base and not v.type.variants
> AttributeError: 'QAPISchemaBuiltinType' object has no attribute 'base'
FWIW, when I install sphinx on F33 (sphinx-build 3.2.1), master doesn't
even build for me, so I uninstalled it again for now...
But the fix is the following, I'll include it in v2.
Kevin
diff --git a/docs/sphinx/qapidoc.py b/docs/sphinx/qapidoc.py
index e03abcbb95..75f6721e29 100644
--- a/docs/sphinx/qapidoc.py
+++ b/docs/sphinx/qapidoc.py
@@ -183,12 +183,14 @@ class QAPISchemaGenRSTVisitor(QAPISchemaVisitor):
if variants:
for v in variants.variants:
- if v.type.is_implicit():
- assert not v.type.base and not v.type.variants
- for m in v.type.local_members:
- term = self._nodes_for_one_member(m)
- term.extend(self._nodes_for_variant_when(variants, v))
- dlnode += self._make_dlitem(term, None)
+ if v.wrapped:
+ term = [nodes.literal('', 'data'),
+ nodes.Text(': '),
+ nodes.literal('', v.type.doc_type())]
+ term.extend(self._nodes_for_variant_when(variants, v))
+ dlnode += self._make_dlitem(term, None)
+ elif v.type.is_implicit():
+ assert v.type.name == 'q_empty'
else:
term = [nodes.Text('The members of '),
nodes.literal('', v.type.doc_type())]
next prev parent reply other threads:[~2020-10-23 14:07 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-23 10:12 [PATCH 0/6] qemu-storage-daemon: QAPIfy --chardev Kevin Wolf
2020-10-23 10:12 ` [PATCH 1/6] char/stdio: Fix QMP default for 'signal' Kevin Wolf
2020-10-23 10:38 ` Marc-André Lureau
2020-10-23 12:12 ` Markus Armbruster
2020-10-23 10:12 ` [PATCH 2/6] char: Factor out qemu_chr_print_types() Kevin Wolf
2020-10-23 10:38 ` Marc-André Lureau
2020-10-23 12:15 ` Markus Armbruster
2020-10-23 10:12 ` [PATCH 3/6] qapi: Remove wrapper struct for simple unions Kevin Wolf
2020-10-23 10:40 ` Marc-André Lureau
2020-10-23 11:06 ` Marc-André Lureau
2020-10-23 12:28 ` Kevin Wolf
2020-10-23 12:49 ` Markus Armbruster
2020-10-23 14:06 ` Kevin Wolf [this message]
2020-10-23 10:12 ` [PATCH 4/6] qapi: Optionally parse simple unions as flat Kevin Wolf
2020-10-23 10:12 ` [PATCH 5/6] tests/qapi-schema: Flat representation of simple unions Kevin Wolf
2020-10-23 10:12 ` [PATCH 6/6] qemu-storage-daemon: Use qmp_chardev_add() for --chardev Kevin Wolf
2020-10-26 13:33 ` Markus Armbruster
2020-10-23 10:36 ` [PATCH 0/6] qemu-storage-daemon: QAPIfy --chardev Daniel P. Berrangé
2020-10-23 11:05 ` Paolo Bonzini
2020-10-23 11:56 ` Kevin Wolf
2020-10-23 13:40 ` Markus Armbruster
2020-10-23 16:08 ` Paolo Bonzini
2020-10-25 17:42 ` 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=20201023140617.GD4793@merkur.fritz.box \
--to=kwolf@redhat.com \
--cc=armbru@redhat.com \
--cc=marcandre.lureau@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.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 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).