Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-06-11 Thread John Snow
On 6/11/21 10:40 AM, Markus Armbruster wrote: John Snow writes: On 5/21/21 1:35 AM, Markus Armbruster wrote: Does not fire for qga/qapi-schema.json. Can you help? Odd. I did: if self._section: ... else: raise QAPIWhicheverErrorItWas(...) and then did a full build and found it

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-06-11 Thread Markus Armbruster
John Snow writes: > On 5/21/21 1:35 AM, Markus Armbruster wrote: >> Does not fire for qga/qapi-schema.json. Can you help? > > Odd. > > I did: > > if self._section: > ... > else: > raise QAPIWhicheverErrorItWas(...) > > and then did a full build and found it to fail on QGA stuff. You may

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-21 Thread John Snow
On 5/21/21 1:35 AM, Markus Armbruster wrote: Does not fire for qga/qapi-schema.json. Can you help? Odd. I did: if self._section: ... else: raise QAPIWhicheverErrorItWas(...) and then did a full build and found it to fail on QGA stuff. You may need --enable-docs to make it happen.

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-20 Thread Markus Armbruster
John Snow writes: > On 5/20/21 10:42 AM, Markus Armbruster wrote: >> First step is to find out how _end_section() can be called twice in a >> row. It isn't in all of "make check". Hmm. > > Ah, maybe not twice in a *row*. It does seem to be called when we have > an "empty section" sometimes,

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-20 Thread John Snow
On 5/20/21 10:42 AM, Markus Armbruster wrote: First step is to find out how _end_section() can be called twice in a row. It isn't in all of "make check". Hmm. Ah, maybe not twice in a *row*. It does seem to be called when we have an "empty section" sometimes, which arises from stuff like

Re: [PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-20 Thread Markus Armbruster
John Snow writes: > It simplifies the typing to say that _section is always a > QAPIDoc.Section(). > > To accommodate this change, we must allow for this object to evaluate to > False for functions like _end_section which behave differently based on > whether or not a Section has been started. >

[PATCH 2/6] qapi/parser: Allow empty QAPIDoc Sections

2021-05-19 Thread John Snow
It simplifies the typing to say that _section is always a QAPIDoc.Section(). To accommodate this change, we must allow for this object to evaluate to False for functions like _end_section which behave differently based on whether or not a Section has been started. Signed-off-by: John Snow ---