qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] qapi: Documentation improvements
@ 2021-10-26 11:10 Markus Armbruster
  2021-10-26 11:10 ` [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph Markus Armbruster
  2021-10-26 11:10 ` [PATCH 2/2] docs/devel/qapi-code-gen: Belatedly document feature documentation Markus Armbruster
  0 siblings, 2 replies; 7+ messages in thread
From: Markus Armbruster @ 2021-10-26 11:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: jsnow, eblake, mdroth, marcandre.lureau

Markus Armbruster (2):
  docs/devel/qapi-code-gen: Drop a duplicate paragraph
  docs/devel/qapi-code-gen: Belatedly document feature documentation

 docs/devel/qapi-code-gen.rst | 29 +++++++++++++++--------------
 1 file changed, 15 insertions(+), 14 deletions(-)

-- 
2.31.1



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph
  2021-10-26 11:10 [PATCH 0/2] qapi: Documentation improvements Markus Armbruster
@ 2021-10-26 11:10 ` Markus Armbruster
  2021-10-26 11:12   ` Philippe Mathieu-Daudé
  2021-10-26 16:09   ` John Snow
  2021-10-26 11:10 ` [PATCH 2/2] docs/devel/qapi-code-gen: Belatedly document feature documentation Markus Armbruster
  1 sibling, 2 replies; 7+ messages in thread
From: Markus Armbruster @ 2021-10-26 11:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, jsnow, eblake, mdroth, marcandre.lureau

Commit 55ec69f8b1 "docs/devel/qapi-code-gen.txt: Update to new rST
backend conventions" accidentally duplicated a paragraph.  Drop it.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 docs/devel/qapi-code-gen.rst | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
index b2569de486..1f6805a705 100644
--- a/docs/devel/qapi-code-gen.rst
+++ b/docs/devel/qapi-code-gen.rst
@@ -993,12 +993,6 @@ multiline argument descriptions.
 A 'Since: x.y.z' tagged section lists the release that introduced the
 definition.
 
-The text of a section can start on a new line, in
-which case it must not be indented at all.  It can also start
-on the same line as the 'Note:', 'Returns:', etc tag.  In this
-case if it spans multiple lines then second and subsequent
-lines must be indented to match the first.
-
 An 'Example' or 'Examples' section is automatically rendered
 entirely as literal fixed-width text.  In other sections,
 the text is formatted, and rST markup can be used.
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] docs/devel/qapi-code-gen: Belatedly document feature documentation
  2021-10-26 11:10 [PATCH 0/2] qapi: Documentation improvements Markus Armbruster
  2021-10-26 11:10 ` [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph Markus Armbruster
@ 2021-10-26 11:10 ` Markus Armbruster
  2021-10-26 15:04   ` Kevin Wolf
  1 sibling, 1 reply; 7+ messages in thread
From: Markus Armbruster @ 2021-10-26 11:10 UTC (permalink / raw)
  To: qemu-devel; +Cc: Kevin Wolf, jsnow, eblake, mdroth, marcandre.lureau

Commit 6a8c0b5102 "qapi: Add feature flags to struct types" neglected
to document how to document feature flags.  Make up for that.

Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 docs/devel/qapi-code-gen.rst | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
index 1f6805a705..4b79623f51 100644
--- a/docs/devel/qapi-code-gen.rst
+++ b/docs/devel/qapi-code-gen.rst
@@ -949,15 +949,16 @@ definition must have documentation.
 Definition documentation starts with a line naming the definition,
 followed by an optional overview, a description of each argument (for
 commands and events), member (for structs and unions), branch (for
-alternates), or value (for enums), and finally optional tagged
-sections.
+alternates), or value (for enums), a description of each feature (if
+any), and finally optional tagged sections.
 
-Descriptions of arguments can span multiple lines.  The description
-text can start on the line following the '\@argname:', in which case it
-must not be indented at all.  It can also start on the same line as
-the '\@argname:'.  In this case if it spans multiple lines then second
-and subsequent lines must be indented to line up with the first
-character of the first line of the description::
+The description of an argument or feature 'name' starts with
+'\@name:'.  The description text can start on the line following the
+'\@argname:', in which case it must not be indented at all.  It can
+also start on the same line as the '\@argname:'.  In this case if it
+spans multiple lines then second and subsequent lines must be indented
+to line up with the first character of the first line of the
+description::
 
  # @argone:
  # This is a two line description
@@ -979,6 +980,12 @@ The number of spaces between the ':' and the text is not significant.
 Extensions added after the definition was first released carry a
 '(since x.y.z)' comment.
 
+The feature descriptions must be preceded by a line "Features:", like
+this::
+
+  # Features:
+  # @feature: Description text
+
 A tagged section starts with one of the following words:
 "Note:"/"Notes:", "Since:", "Example"/"Examples", "Returns:", "TODO:".
 The section ends with the start of a new section.
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph
  2021-10-26 11:10 ` [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph Markus Armbruster
@ 2021-10-26 11:12   ` Philippe Mathieu-Daudé
  2021-10-26 16:09   ` John Snow
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-10-26 11:12 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel
  Cc: Peter Maydell, jsnow, mdroth, eblake, marcandre.lureau

On 10/26/21 13:10, Markus Armbruster wrote:
> Commit 55ec69f8b1 "docs/devel/qapi-code-gen.txt: Update to new rST
> backend conventions" accidentally duplicated a paragraph.  Drop it.
> 
> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  docs/devel/qapi-code-gen.rst | 6 ------
>  1 file changed, 6 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] docs/devel/qapi-code-gen: Belatedly document feature documentation
  2021-10-26 11:10 ` [PATCH 2/2] docs/devel/qapi-code-gen: Belatedly document feature documentation Markus Armbruster
@ 2021-10-26 15:04   ` Kevin Wolf
  2021-10-26 15:16     ` Markus Armbruster
  0 siblings, 1 reply; 7+ messages in thread
From: Kevin Wolf @ 2021-10-26 15:04 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: jsnow, eblake, qemu-devel, marcandre.lureau, mdroth

Am 26.10.2021 um 13:10 hat Markus Armbruster geschrieben:
> Commit 6a8c0b5102 "qapi: Add feature flags to struct types" neglected
> to document how to document feature flags.  Make up for that.
> 
> Cc: Kevin Wolf <kwolf@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  docs/devel/qapi-code-gen.rst | 23 +++++++++++++++--------
>  1 file changed, 15 insertions(+), 8 deletions(-)
> 
> diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
> index 1f6805a705..4b79623f51 100644
> --- a/docs/devel/qapi-code-gen.rst
> +++ b/docs/devel/qapi-code-gen.rst
> @@ -949,15 +949,16 @@ definition must have documentation.
>  Definition documentation starts with a line naming the definition,
>  followed by an optional overview, a description of each argument (for
>  commands and events), member (for structs and unions), branch (for
> -alternates), or value (for enums), and finally optional tagged
> -sections.
> +alternates), or value (for enums), a description of each feature (if
> +any), and finally optional tagged sections.
>  
> -Descriptions of arguments can span multiple lines.  The description
> -text can start on the line following the '\@argname:', in which case it
> -must not be indented at all.  It can also start on the same line as
> -the '\@argname:'.  In this case if it spans multiple lines then second
> -and subsequent lines must be indented to line up with the first
> -character of the first line of the description::
> +The description of an argument or feature 'name' starts with
> +'\@name:'.  The description text can start on the line following the
> +'\@argname:', in which case it must not be indented at all.  It can
> +also start on the same line as the '\@argname:'.  In this case if it
> +spans multiple lines then second and subsequent lines must be indented
> +to line up with the first character of the first line of the
> +description::

I'm confused. Are @name and @argname really two different things? What
does each one mean?

Kevin



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] docs/devel/qapi-code-gen: Belatedly document feature documentation
  2021-10-26 15:04   ` Kevin Wolf
@ 2021-10-26 15:16     ` Markus Armbruster
  0 siblings, 0 replies; 7+ messages in thread
From: Markus Armbruster @ 2021-10-26 15:16 UTC (permalink / raw)
  To: Kevin Wolf
  Cc: qemu-devel, eblake, mdroth, Markus Armbruster, marcandre.lureau, jsnow

Kevin Wolf <kwolf@redhat.com> writes:

> Am 26.10.2021 um 13:10 hat Markus Armbruster geschrieben:
>> Commit 6a8c0b5102 "qapi: Add feature flags to struct types" neglected
>> to document how to document feature flags.  Make up for that.
>> 
>> Cc: Kevin Wolf <kwolf@redhat.com>
>> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>> ---
>>  docs/devel/qapi-code-gen.rst | 23 +++++++++++++++--------
>>  1 file changed, 15 insertions(+), 8 deletions(-)
>> 
>> diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
>> index 1f6805a705..4b79623f51 100644
>> --- a/docs/devel/qapi-code-gen.rst
>> +++ b/docs/devel/qapi-code-gen.rst
>> @@ -949,15 +949,16 @@ definition must have documentation.
>>  Definition documentation starts with a line naming the definition,
>>  followed by an optional overview, a description of each argument (for
>>  commands and events), member (for structs and unions), branch (for
>> -alternates), or value (for enums), and finally optional tagged
>> -sections.
>> +alternates), or value (for enums), a description of each feature (if
>> +any), and finally optional tagged sections.
>>  
>> -Descriptions of arguments can span multiple lines.  The description
>> -text can start on the line following the '\@argname:', in which case it
>> -must not be indented at all.  It can also start on the same line as
>> -the '\@argname:'.  In this case if it spans multiple lines then second
>> -and subsequent lines must be indented to line up with the first
>> -character of the first line of the description::
>> +The description of an argument or feature 'name' starts with
>> +'\@name:'.  The description text can start on the line following the
>> +'\@argname:', in which case it must not be indented at all.  It can
>> +also start on the same line as the '\@argname:'.  In this case if it
>> +spans multiple lines then second and subsequent lines must be indented
>> +to line up with the first character of the first line of the
>> +description::
>
> I'm confused. Are @name and @argname really two different things? What
> does each one mean?

Editing screwup!  I meant to use @name every time.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph
  2021-10-26 11:10 ` [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph Markus Armbruster
  2021-10-26 11:12   ` Philippe Mathieu-Daudé
@ 2021-10-26 16:09   ` John Snow
  1 sibling, 0 replies; 7+ messages in thread
From: John Snow @ 2021-10-26 16:09 UTC (permalink / raw)
  To: Markus Armbruster
  Cc: Peter Maydell, Marc-André Lureau, Eric Blake, qemu-devel, mdroth

[-- Attachment #1: Type: text/plain, Size: 1428 bytes --]

On Tue, Oct 26, 2021 at 7:10 AM Markus Armbruster <armbru@redhat.com> wrote:

> Commit 55ec69f8b1 "docs/devel/qapi-code-gen.txt: Update to new rST
> backend conventions" accidentally duplicated a paragraph.  Drop it.
>
>
Fixes: 55ec69f8b1
.... well, on second thought, that backport would have to go backwards
through a ReST conversion, so ... maybe not. Nevermind.


> Cc: Peter Maydell <peter.maydell@linaro.org>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
>

Reviewed-by: John Snow <jsnow@redhat.com>


> ---
>  docs/devel/qapi-code-gen.rst | 6 ------
>  1 file changed, 6 deletions(-)
>
> diff --git a/docs/devel/qapi-code-gen.rst b/docs/devel/qapi-code-gen.rst
> index b2569de486..1f6805a705 100644
> --- a/docs/devel/qapi-code-gen.rst
> +++ b/docs/devel/qapi-code-gen.rst
> @@ -993,12 +993,6 @@ multiline argument descriptions.
>  A 'Since: x.y.z' tagged section lists the release that introduced the
>  definition.
>
> -The text of a section can start on a new line, in
> -which case it must not be indented at all.  It can also start
> -on the same line as the 'Note:', 'Returns:', etc tag.  In this
> -case if it spans multiple lines then second and subsequent
> -lines must be indented to match the first.
> -
>  An 'Example' or 'Examples' section is automatically rendered
>  entirely as literal fixed-width text.  In other sections,
>  the text is formatted, and rST markup can be used.
> --
> 2.31.1
>
>

[-- Attachment #2: Type: text/html, Size: 2409 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-10-26 16:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 11:10 [PATCH 0/2] qapi: Documentation improvements Markus Armbruster
2021-10-26 11:10 ` [PATCH 1/2] docs/devel/qapi-code-gen: Drop a duplicate paragraph Markus Armbruster
2021-10-26 11:12   ` Philippe Mathieu-Daudé
2021-10-26 16:09   ` John Snow
2021-10-26 11:10 ` [PATCH 2/2] docs/devel/qapi-code-gen: Belatedly document feature documentation Markus Armbruster
2021-10-26 15:04   ` Kevin Wolf
2021-10-26 15:16     ` Markus Armbruster

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).