diff mbox series

[18/20] qapi: ensure all errors sections are uniformly typset

Message ID 20240514215740.940155-19-jsnow@redhat.com (mailing list archive)
State New, archived
Headers show
Series qapi: new sphinx qapi domain pre-requisites | expand

Commit Message

John Snow May 14, 2024, 9:57 p.m. UTC
Transactions have the only instance of an Errors section that isn't a
rST list; turn it into one.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 qapi/transaction.json | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Markus Armbruster June 14, 2024, 11:24 a.m. UTC | #1
John Snow <jsnow@redhat.com> writes:

> Transactions have the only instance of an Errors section that isn't a
> rST list; turn it into one.

Just for consistency?  Or do you have other shenanigans up your sleeve?

If we want the Errors sections to remain all rST lists, we should update
docs/devel/qapi-code-gen.rst to say so.

> Signed-off-by: John Snow <jsnow@redhat.com>
John Snow June 17, 2024, 5:56 p.m. UTC | #2
On Fri, Jun 14, 2024, 7:24 AM Markus Armbruster <armbru@redhat.com> wrote:

> John Snow <jsnow@redhat.com> writes:
>
> > Transactions have the only instance of an Errors section that isn't a
> > rST list; turn it into one.
>
> Just for consistency?  Or do you have other shenanigans up your sleeve?
>

Just consistency at this precise moment in time, but it's *possible* I may
introduce shenanigans for visual consistency in the rendered output, for
which having a uniform format would make mechanical conversions in the
generator easier/possible.

It's an idea I had but didn't implement yet. I figured I'd write this patch
anyway because it isn't wrong, and you yourself seemed to believe it would
*always* be a RST list, when that isn't strictly true.


> If we want the Errors sections to remain all rST lists, we should update
> docs/devel/qapi-code-gen.rst to say so.
>

OK, will do.


> > Signed-off-by: John Snow <jsnow@redhat.com>
>
>
Markus Armbruster June 18, 2024, 8:52 a.m. UTC | #3
John Snow <jsnow@redhat.com> writes:

> On Fri, Jun 14, 2024, 7:24 AM Markus Armbruster <armbru@redhat.com> wrote:
>
>> John Snow <jsnow@redhat.com> writes:
>>
>> > Transactions have the only instance of an Errors section that isn't a
>> > rST list; turn it into one.
>>
>> Just for consistency?  Or do you have other shenanigans up your sleeve?
>
> Just consistency at this precise moment in time, but it's *possible* I may
> introduce shenanigans for visual consistency in the rendered output, for
> which having a uniform format would make mechanical conversions in the
> generator easier/possible.
>
> It's an idea I had but didn't implement yet. I figured I'd write this patch
> anyway because it isn't wrong, and you yourself seemed to believe it would
> *always* be a RST list, when that isn't strictly true.
>
>
>> If we want the Errors sections to remain all rST lists, we should update
>> docs/devel/qapi-code-gen.rst to say so.
>>
>
> OK, will do.

With such an update, we could perhaps sell the patch like

    qapi: Nail down convention that Errors sections are lists

    By unstated convention, Errors sections are rST lists.  Document the
    convention, and make the one exception conform.

>
>
>> > Signed-off-by: John Snow <jsnow@redhat.com>
>>
>>
diff mbox series

Patch

diff --git a/qapi/transaction.json b/qapi/transaction.json
index 5749c133d4a..07afc269d54 100644
--- a/qapi/transaction.json
+++ b/qapi/transaction.json
@@ -235,7 +235,7 @@ 
 #     additional detail.
 #
 # Errors:
-#     Any errors from commands in the transaction
+#     - Any errors from commands in the transaction
 #
 # Note: The transaction aborts on the first failure.  Therefore, there
 #     will be information on only one failed operation returned in an