qapi/parser: add mea culpa comment for ensure_returns
These algorithms are quite a mess currently, but they are temporary until we add the inliner which will address these issues more holistically. For now, add the "mea culpa". Signed-off-by: John Snow <jsnow@redhat.com> Message-ID: <20260611042332.482979-10-jsnow@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
John Snow committed
Jun 11, 2026 at 00:23 UTC
7a22b0da5bc4f66c0a462f84c3d4d03b9e51be38
1 file changed
+7
scripts/qapi/parser.py
+7
@@ -866,6 +866,13 @@ class QAPIDoc:
866
self._features[feature.name].connect(feature)
867
868
def ensure_returns(self, info: QAPISourceInfo) -> None:
869
+ # This is more complicated than it ought to be. The doc
870
+ # parser should already know where a generated RETURNS section
871
+ # should go. It currently doesn't, mostly because it accepts
872
+ # tagged sections in any order.
873
+ #
874
+ # TODO: Tighten doc syntax and simplify.
875
+
876
if any(s.kind == QAPIDoc.Kind.RETURNS for s in self.all_sections):
877
return
878