Skip to content

Commit

Permalink
qapi: Don't suppress doc generation without pragma doc-required
Browse files Browse the repository at this point in the history
Commit bc52d03 "qapi: Make doc comments optional where we don't
need them" made scripts/qapi2texi.py fail[*] unless the schema had
pragma 'doc-required': true.  The stated reason was inability to cope
with incomplete documentation.

When commit fb0bc83 "qapi-gen: New common driver for code and doc
generators" folded scripts/qapi2texi.py into scripts/qapi-gen.py, it
turned the failure into silent suppression.

The doc generator can cope with incomplete documentation now.  I don't
know since when, or what the problem was, or even whether it ever
existed.

Drop the silent suppression.

[*] The fail part was broken, fixed in commit e8ba07e.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20191018074345.24034-2-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Oct 22, 2019
1 parent e9d4246 commit f3d4aa5
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions scripts/qapi/doc.py
Expand Up @@ -283,8 +283,6 @@ def freeform(self, doc):


def gen_doc(schema, output_dir, prefix):
if not qapi.common.doc_required:
return
vis = QAPISchemaGenDocVisitor(prefix)
vis.visit_begin(schema)
for doc in schema.docs:
Expand Down
1 change: 1 addition & 0 deletions tests/Makefile.include
Expand Up @@ -609,6 +609,7 @@ 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)
Expand Down

0 comments on commit f3d4aa5

Please sign in to comment.