Daniel P. Berrangé writes:
> On Tue, Jul 30, 2024 at 02:26:49PM +0200, Markus Armbruster wrote:
>> Daniel P. Berrangé writes:
>>
>> > On Tue, Jul 30, 2024 at 10:10:25AM +0200, Markus Armbruster wrote:
>> >> QAPI's 'prefix' feature can make the connection be
Typo in subject: it's "deprecate".
Vladimir Sementsov-Ogievskiy writes:
> On 18.07.24 14:01, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy writes:
>>
>>> That's a first step to move on newer job-* APIs.
>>>
>>> The difference between block-job-change and job-change is in
>
bility"
> " issues during option rom execution",
> vdev->vbasedev.name);
> error_printf("Proceeding anyway since user specified"
> - " non zero value for rombar\n");
> + " positive value for rombar\n");
> } else {
> warn_report("Rom loading for device at %s has been disabled"
> " due to system instability issues",
Preferably with the commit message tweak:
Reviewed-by: Markus Armbruster
Akihiko Odaki writes:
> On 2024/08/01 16:52, Michael S. Tsirkin wrote:
>> On Thu, Aug 01, 2024 at 04:01:44PM +0900, Akihiko Odaki wrote:
>>> rom_bar_set() and and underlying visit_type_str_preserving() are ugly, but
>>> we can remove them once the deprecation period ends. On the other hand, if
Akihiko Odaki writes:
> On 2024/07/31 17:32, Markus Armbruster wrote:
>> Akihiko Odaki writes:
>>
>>> rom_bar is tristate but was defined as uint32_t so convert it into
>>> OnOffAuto to clarify that. For compatibility, a uint32 value set via
>>
> +++ b/hw/block/fdc-isa.c
> @@ -147,6 +147,8 @@ static void isa_fdc_get_drive_max_chs(FloppyDriveType
> type, uint8_t *maxc,
> *maxs = fdf->last_sect;
> }
> }
> +/* fd_formats must contain at least one entry per FloppyDriveType */
> +assert(*maxc);
> (*maxc)--;
> }
Reviewed-by: Markus Armbruster
r at a time */
@size is int. I wonder why it's fine with size >> 8... ah,
atapi_byte_count_limit() returns uint16_t, and Coverity is smart enough
to data-flow this via @byte_count_limit into @size.
Reviewed-by: Markus Armbruster
Akihiko Odaki writes:
> rom_bar is tristate but was defined as uint32_t so convert it into
> OnOffAuto to clarify that. For compatibility, a uint32 value set via
> QOM will be converted into OnOffAuto.
>
> Signed-off-by: Akihiko Odaki
I agree making property "rombar" an integer was a design
Avihai Horon writes:
> On 31/07/2024 8:12, Markus Armbruster wrote:
>> External email: Use caution opening links or attachments
>>
>>
>> Avihai Horon writes:
>>
>>> On 30/07/2024 15:22, Markus Armbruster wrote:
>>>> Avihai, there's a ques
Avihai Horon writes:
> On 30/07/2024 15:22, Markus Armbruster wrote:
>>
>> Avihai, there's a question for you on VfioMigrationState.
>>
>> Daniel P. Berrangé writes:
>>
>>> On Tue, Jul 30, 2024 at 10:10:15AM +0200, Markus Armbruster wrote:
[...]
>
Daniel P. Berrangé writes:
> On Tue, Jul 30, 2024 at 10:10:25AM +0200, Markus Armbruster wrote:
>> QAPI's 'prefix' feature can make the connection between enumeration
>> type and its constants less than obvious. It's best used with
>> restraint.
>>
>> Q
Avihai, there's a question for you on VfioMigrationState.
Daniel P. Berrangé writes:
> On Tue, Jul 30, 2024 at 10:10:15AM +0200, Markus Armbruster wrote:
>> camel_to_upper() converts its argument from camel case to upper case
>> with '_' between words. Used for generated enume
Recent commit "qapi: Smarter camel_to_upper() to reduce need for
'prefix'" added a temporary 'prefix' to delay changing the generated
code.
Revert it. This changes TestUnionEnumA's generated enumeration
constant prefix from TEST_UNION_ENUMA to TEST_UNION_ENUM_A.
Signed-off-by: Markus
Recent commit "qapi: Smarter camel_to_upper() to reduce need for
'prefix'" added a temporary 'prefix' to delay changing the generated
code.
Revert it. This improves HmatLBDataType's generated enumeration
constant prefix from HMATLB_DATA_TYPE to HMAT_LB_DATA_TYPE.
Signed-off-
', but I think the abbreviation "alg" is
less than clear.
Additionally rename the type to QCryptodevBackendAlgoType. The prefix
becomes QCRYPTODEV_BACKEND_ALGO_TYPE.
Signed-off-by: Markus Armbruster
---
qapi/cryptodev.json | 5 ++---
include/sysemu/cryptodev.h | 2 +-
', but then the prefix becomes
QCRYPTO_IV_GEN_ALGORITHM, which is rather long.
We could additionally rename the type to QCryptoIVGenAlg, but I think
the abbreviation "alg" is less than clear.
Rename the type to QCryptoIVGenAlgo instead. The prefix becomes
QCRYPTO_IV_GEN_ALGO.
Signed-off-
O.
Signed-off-by: Markus Armbruster
---
qapi/crypto.json| 7 +++
crypto/akcipherpriv.h | 2 +-
backends/cryptodev-builtin.c| 4 ++--
backends/cryptodev-lkcf.c | 4 ++--
crypto/akcipher.c | 2 +-
t
Recent commit "qapi: Smarter camel_to_upper() to reduce need for
'prefix'" added a temporary 'prefix' to delay changing the generated
code.
Revert it. This improves DisplayGLMode's generated enumeration
constant prefix from DISPLAYGL_MODE to DISPLAY_GL_MODE.
Signed-off-by: Markus
becomes QCRYPTODEV_BACKEND_SERVICE_TYPE.
Signed-off-by: Markus Armbruster
---
qapi/cryptodev.json | 1 -
backends/cryptodev-builtin.c| 8
backends/cryptodev-lkcf.c | 2 +-
backends/cryptodev-vhost-user.c | 6 +++---
backends/cryptodev.c| 6
', but then the prefix becomes
QCRYPTO_HASH_ALGORITHM, which is rather long.
We could additionally rename the type to QCryptoHashAlg, but I think
the abbreviation "alg" is less than clear.
Rename the type to QCryptoHashAlgo instead. The prefix becomes to
QCRYPTO_HASH_ALGO.
Signed-off-by: Markus
V_BACKEND_SERVICE_TYPE
QCRYPTODEV_BACKEND_SERVICE
Subsequent commits will tweak things to remove most of these prefixes.
Only QAUTHZ_LIST_FORMAT and QAUTHZ_LIST_POLICY will remain.
Signed-off-by: Markus Armbruster
---
qapi/block-core.json | 3 +-
qapi/common.json
For consistency with other types names *Algo.
Signed-off-by: Markus Armbruster
---
crypto/afalgpriv.h| 14 +++---
crypto/hmacpriv.h | 2 +-
crypto/afalg.c| 8
crypto/cipher-afalg.c | 12 ++--
crypto/hash-afalg.c | 14 +++---
5 files changed
ix becomes
QCRYPTO_RSA_PADDING_ALGO.
Signed-off-by: Markus Armbruster
---
qapi/crypto.json| 9 -
backends/cryptodev-builtin.c| 6 +++---
backends/cryptodev-lkcf.c | 10 +-
tests/bench/benchmark-crypto-akcipher.c | 12 ++--
tests/unit/t
'prefix' where the default is now better.
PATCH 09,11-15,18 rename QAPI types, and drop their 'prefix'. I'm
prepared to adjust the renames according to maintainers' preference.
PATCH 16 renames a non-QAPI type for consistency.
Markus Armbruster (18):
qapi: Smarter camel_to_upper() to reduce need
OCK_FORMAT,
and QCryptoBlockLUKSKeyslotState's from
Q_CRYPTO_BLOCKLUKS_KEYSLOT_STATE to QCRYPTO_BLOCK_LUKS_KEYSLOT_STATE.
Signed-off-by: Markus Armbruster
---
qapi/crypto.json | 2 --
block/crypto.c | 10 +-
block/qcow.c | 2 +-
block/qcow2.c
CK_BACKEND to
XDBG_BLOCK_GRAPH_NODE_TYPE_BLOCK_BACKEND.
Signed-off-by: Markus Armbruster
---
qapi/block-core.json | 1 -
block.c | 6 +++---
2 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 897bc7e0e7..d4c869ac64 100644
--- a/qapi/block-core.
', but then the prefix becomes
QCRYPTO_CIPHER_ALGORITHM, which is rather long.
We could additionally rename the type to QCryptoCipherAlg, but I think
the abbreviation "alg" is less than clear.
Rename the type to QCryptoCipherAlgo instead. The prefix becomes
QCRYPTO_CIPHER_ALGO.
Signed-off-
the type to S390CpuEntitlement, so that 'prefix' is not needed.
Likewise change CpuS390Polarization to S390CpuPolarization, and
CpuS390State to S390CpuState.
Signed-off-by: Markus Armbruster
---
qapi/machine-common.json| 5 ++---
qapi/machine-target.json| 11 +--
qapi
Recent commit "qapi: Smarter camel_to_upper() to reduce need for
'prefix'" added a temporary 'prefix' to delay changing the generated
code.
Revert it. This improves OffAutoPCIBAR's generated enumeration
constant prefix from OFF_AUTOPCIBAR_OFF to OFF_AUTO_PCIBAR_OFF.
Signed-off-
Recent commit "qapi: Smarter camel_to_upper() to reduce need for
'prefix'" added a temporary 'prefix' to delay changing the generated
code.
Revert it. This improves EbpfProgramID's generated enumeration
constant prefix from EBPF_PROGRAMID to EBPF_PROGRAM_ID.
Signed-off-by: Markus
becomes QCRYPTO_AK_CIPHER_KEY_TYPE.
Signed-off-by: Markus Armbruster
---
qapi/crypto.json| 1 -
backends/cryptodev-builtin.c| 4 ++--
backends/cryptodev-lkcf.c | 6 +++---
tests/bench/benchmark-crypto-akcipher.c | 2 +-
tests/unit/test-crypto
Kevin Wolf writes:
> Am 19.07.2024 um 06:54 hat Markus Armbruster geschrieben:
>> Kevin Wolf writes:
>>
>> > Am 09.01.2024 um 14:13 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> >> From: Leonid Kaplan
>> >>
>> >> BLOCK_IO_ERROR
Vladimir Sementsov-Ogievskiy writes:
> On 18.07.24 11:27, Markus Armbruster wrote:
>> Vladimir Sementsov-Ogievskiy writes:
>>
>>> Add command to sync config from vhost-user backend to the device. It
>>> may be helpful when VHOST_USER_SLAVE_CONFIG_CHANG
Kevin Wolf writes:
> Am 09.01.2024 um 14:13 hat Vladimir Sementsov-Ogievskiy geschrieben:
>> From: Leonid Kaplan
>>
>> BLOCK_IO_ERROR events comes from guest, so we must throttle them.
>> We still want per-device throttling, so let's use device id as a key.
>>
>> Signed-off-by: Leonid Kaplan
nt, where it
is more prominently visible, with a slight rephrasing for clarity.
Signed-off-by: Markus Armbruster
---
qapi/block-core.json | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index f400b334c8..994e384a71 100644
--- a/
Vladimir Sementsov-Ogievskiy writes:
> Add a command that can replace bs in following BdrvChild structures:
>
> - qdev blk root child
> - block-export blk root child
> - any child of BlockDriverState selected by child-name
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> blockdev.c
Vladimir Sementsov-Ogievskiy writes:
> We need it for further blockdev-replace functionality.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
> ---
> block/export/export.c | 18 ++
> include/sysemu/block-backend-global-state.h | 1 +
> 2 files changed, 19
Vladimir Sementsov-Ogievskiy writes:
> That's a first step to move on newer job-* APIs.
>
> The difference between block-job-change and job-change is in
> find_block_job_locked() vs find_job_locked() functions. What's
> different?
>
> 1. find_block_job_locked() do check, is found job a
Vladimir Sementsov-Ogievskiy writes:
> Add a new-style command job-change, doing same thing as
> block-job-change. The aim is finally deprecate block-job-* APIs and
> move to job-* APIs.
>
> We add a new command to qapi/block-core.json, not to
> qapi/job.json to avoid resolving json file
ackground' to 'write-blocking' is implemented.
> +# If absent, copy mode remains the same. (optional since 9.1)
> #
> # Since: 8.2
> ##
> { 'struct': 'JobChangeOptionsMirror',
> - 'data': { 'copy-mode' : 'MirrorCopyMode' } }
> + 'data': { '*copy-mode' : 'MirrorCopyMode' } }
>
> ##
> # @JobChangeOptions:
Acked-by: Markus Armbruster
> git grep -l BlockJobChangeOptions | \
> xargs sed -i 's/BlockJobChangeOptions/JobChangeOptions/g'
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
Acked-by: Markus Armbruster
Vladimir Sementsov-Ogievskiy writes:
> ping. Markus, Eric, could someone give an ACC for QAPI part?
I apologize for the delay. It was pretty bad.
find_device_state_legacy().
2. New find_device_state() that reports GenericError.
Could also be done in a follow-up.
>
> Signed-off-by: Vladimir Sementsov-Ogievskiy
The patch does what it says on the tin, so
Reviewed-by: Markus Armbruster
gt; Command result is racy if allow it during migration. Let's allow the
> sync only in RUNNING state.
Is this still accurate? The runstate_is_running() check is gone in
v4, the migration_is_running() check remains.
> Signed-off-by: Vladimir Sementsov-Ogievskiy
QAPI schema and QMP par
John Snow writes:
> On Wed, Jul 17, 2024, 3:44 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > Use the no-option form of ".. qmp-example::" to convert any Examples
>> > that do not have any form of caption or explanation whatsoever. N
John Snow writes:
> This patchset focuses on converting example sections to rST directives
> using a new `.. qmp-example::` directive.
Queued, thanks!
h qmp-example can be titled or annotated independently without
>bypassing the QMP lexer/validator.
>
>(i.e. code blocks are now for *code* only, so we don't have to
>sacrifice exposition for having lexically valid examples.)
>
> NOTE: As with the "Notes" conversion (
John Snow writes:
> Use the no-option form of ".. qmp-example::" to convert any Examples
> that do not have any form of caption or explanation whatsoever. Note
> that in a few cases, example sections are split into two or more
> separate example blocks. This is only done stylistically to create
John Snow writes:
> On Tue, Jul 9, 2024 at 6:52 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > Fully eliminate the "Example" sections in QAPI doc blocks now that they
>> > have all been converted to arbitrary rST syntax using the
&
John Snow writes:
> On Tue, Jul 9, 2024 at 6:34 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > From: Harmonie Snow
>> >
>> > Add CSS styling for qmp-example directives to increase readability and
>> > consistently style all
You achieved a clean & consistent look for notes and examples in the
browser. Love it!
stogram-set",
> # "arguments": { "id": "drive0",
# "boundaries": [10, 50, 100],
# "boundaries-write": [1000, 5000] } }
# <- { "return": {} }
#
# .. qmp-example::
#:title: Remove all latency histograms
#
# -> { "execute": "block-latency-histogram-set",
# "arguments": { "id": "drive0" } }
# <- { "return": {} }
##
I think using :annotated: for this one as well will look better.
[...]
Reviewed-by: Markus Armbruster
irective", for a
> detailed explanation of this custom directive syntax.
>
> See commit+2: "qapi: remove "Example" doc section" for a detailed
> explanation of why.
>
> Signed-off-by: John Snow
Reviewed-by: Markus Armbruster
John Snow writes:
> On Sat, Jul 6, 2024, 10:42 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > Use the no-option form of ".. qmp-example::" to convert any Examples
>> > that do not have any form of caption or explanation whatsoever. N
John Snow writes:
> Fully eliminate the "Example" sections in QAPI doc blocks now that they
> have all been converted to arbitrary rST syntax using the
> ".. qmp-example::" directive. Update tests to match.
>
> Migrating to the new syntax
> ---
>
> The old "Example:" or
John Snow writes:
> From: Harmonie Snow
>
> Add CSS styling for qmp-example directives to increase readability and
> consistently style all example blocks.
>
> Signed-off-by: Harmonie Snow
> Signed-off-by: John Snow
Same sadness as for the previous patch.
Acked-by: Markus Armbruster
guration nodes. We may
> well decide that the default language ought to be QMP for any QAPI
> reference pages, but this way the directive behaves consistently no
> matter where it is used.
>
> Signed-off-by: John Snow
Sadly, the previous patch didn't add tests, so this patch's effect
isn't as easy to observe as it could be.
Acked-by: Markus Armbruster
stently using
> the same directive for all forms of examples to ensure consistent visual
> styling, and ensuring all relevant prose is visually grouped alongside
> the code literal block.
>
> Note that as of this commit, the code-block rST syntax "::" does not
> apply QMP highlighting; you would need to use ".. code-block:: QMP". The
> very next commit changes this behavior to assume all "::" code blocks
> within this directive are QMP blocks.
>
> Signed-off-by: John Snow
Acked-by: Markus Armbruster
John Snow writes:
> On Sat, Jul 6, 2024, 10:47 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > Factor out the compatibility parser helper into a base class, so it can
>> > be shared by other directives.
>> >
>> > Signed-off-by
Cc: Block layer core maintainers
Philippe Mathieu-Daudé writes:
> On 8/7/24 16:58, Alex Bennée wrote:
>> Hi,
>> The KVM/QEMU community call is at:
>>https://meet.jit.si/kvmcallmeeting
>>@
>>9/7/2024 14:00 UTC
>> Are there any agenda items for the sync-up?
>
> - I don't remember who
John Snow writes:
> Factor out the compatibility parser helper into a base class, so it can
> be shared by other directives.
>
> Signed-off-by: John Snow
R-by stands.
John Snow writes:
> Use the no-option form of ".. qmp-example::" to convert any Examples
> that do not have any form of caption or explanation whatsoever. Note
> that in a few cases, example sections are split into two or more
> separate example blocks. This is only done stylistically to create
John Snow writes:
> We do not need a dedicated section for notes. By eliminating a specially
> parsed section, these notes can be treated as normal rST paragraphs in
> the new QMP reference manual, and can be placed and styled much more
> flexibly.
>
> Convert all existing "Note" and "Notes"
John Snow writes:
> On Fri, Jun 28, 2024, 3:55 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > Sphinx does not like sections without titles, because it wants to
>> > convert every section into a reference. When there is no title, it
>> >
John Snow writes:
> This is a directive that creates a syntactic sugar for creating
> "Example" boxes very similar to the ones already used in the bitmaps.rst
> document, please see e.g.
> https://www.qemu.org/docs/master/interop/bitmaps.html#creation-block-dirty-bitmap-add
>
> In its simplest
lf.state, rstlist, node)
> -else:
> -save = self.state.memo.reporter
> -self.state.memo.reporter = AutodocReporter(
> - rstlist, self.state.memo.reporter
> -)
> -try:
> -nested_parse_with_titles(self.state, rstlist, node)
> -finally:
> -self.state.memo.reporter = save
> -
>
> def setup(app):
> """Register qapi-doc directive with Sphinx"""
Reviewed-by: Markus Armbruster
have been turned into ordinary paragraphs within the example.
Okay?
> NOTE: Because qapidoc.py does not attempt to preserve source ordering of
> sections, the conversion of Notes from a "tagged section" to an
> "untagged section" means that rendering order for some notes *may
> change* as a result of this patch. The forthcoming qapidoc.py rewrite
> strictly preserves source ordering in the rendered documentation, so
> this issue will be rectified in the new generator.
>
> Signed-off-by: John Snow
> Acked-by: Stefan Hajnoczi [for block*.json]
I dislike the indentation changes, and may revert them in my tree.
Reviewed-by: Markus Armbruster
ee, leading to errors during rendering time.)
>
> When parsing an untagged section (free paragraphs), skip making a hollow
> section and instead append the parse results to the prior section.
>
> Many Bothans died to bring us this information.
>
> Signed-off-by: John Snow
>
>
> Code that I intend to keep is still subject to the delinting beam.
>
> Signed-off-by: John Snow
> Reviewed-by: Markus Armbruster
Not an objection, just so you know: I still see a few C0411 like 'third
party import "import sphinx" should be placed before ...'
R-by stands.
gged sections.
>
> Signed-off-by: John Snow
Reviewed-by: Markus Armbruster
y of preserving indents for rST.
> Signed-off-by: John Snow
> [Edited commit message and code comments per review --js]
And I'll drop this line.
> Reviewed-by: Markus Armbruster
John Snow writes:
> This function has been unused since fd62bff901b.
>
> Signed-off-by: John Snow
Reviewed-by: Markus Armbruster
I assume you won't mind me adding a bit of polish: "since commit
fd62bff901b (sphinx/qapidoc: Drop code to generate doc for simple union
tag)".
Accidental duplicate, please ignore.
Accidental duplicate, please ignore.
y of preserving indents for rST.
> Signed-off-by: John Snow
> [Edited commit message and code comments per review --js]
And I'll drop this line.
> Reviewed-by: Markus Armbruster
John Snow writes:
> This function has been unused since fd62bff901b.
>
> Signed-off-by: John Snow
Reviewed-by: Markus Armbruster
I assume you won't mind me adding a bit of polish: "since commit
fd62bff901b (sphinx/qapidoc: Drop code to generate doc for simple union
tag)".
You asked for a summary of my review findings. Here it is:
* PATCH 01: DO-NOT-MERGE, not reviewed
* PATCH 02, 05..07, 10..12: R-by or A-by
* PATCH 03: R-by with straightforward minor adjustments
* PATCH 04, 08: R-by with commit message and doc tweaks
* PATCH 09:
- Commit message tweaks
John Snow writes:
> Eliminate the "Example" sections in QAPI doc blocks, converting them
> into QMP example code blocks. This is generally done in this patch by
> converting "Example:" or "Examples:" lines into ".. code-block:: QMP"
> lines.
[...]
> diff --git a/qapi/migration.json
John Snow writes:
> On Fri, Jun 21, 2024 at 8:23 AM Markus Armbruster wrote:
[...]
>> My reason for four spaces is reducing churn. To see by how much, I
>> redid your change. I found a few more notes that don't start with a
>> capital letter, or don't end with a period
John Snow writes:
> On Fri, Jun 21, 2024 at 2:38 AM Markus Armbruster wrote:
[...]
>> I'd like you to express more clearly that you're talking about an
>> alternative you rejected. Perhaps like this:
>>
>> block-level constructs such as code blocks, lists,
John Snow writes:
> On Thu, Jun 20, 2024 at 11:46 AM John Snow wrote:
>
>>
>>
>> On Thu, Jun 20, 2024, 9:35 AM Markus Armbruster wrote:
>>
>>> Markus Armbruster writes:
>>>
>>> > John Snow writes:
>>>
>>> [...]
&g
John Snow writes:
> We do not need a dedicated section for notes. By eliminating a specially
> parsed section, these notes can be treated as normal rST paragraphs in
> the new QMP reference manual, and can be placed and styled much more
> flexibly.
>
> Convert all existing "Note" and "Notes"
John Snow writes:
> On Wed, Jun 19, 2024, 8:49 AM Markus Armbruster wrote:
>
>> John Snow writes:
[...]
>> > diff --git a/tests/qapi-schema/doc-interleaved-section.json
>> > b/tests/qapi-schema/doc-interleaved-section.json
>> > index adb29e98daa..b
John Snow writes:
> Apologies, I meant to do this but forgot there were two cases and only
> nabbed one.
>
> Fixing.
No problem at all!
John Snow writes:
> On Thu, Jun 20, 2024, 11:07 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster wrote:
>> >
>> >> John Snow writes:
>> >>
>> >> > Change get_
John Snow writes:
> On Wed, Jun 19, 2024, 8:03 AM Markus Armbruster wrote:
>
>> John Snow writes:
>>
>> > Change get_doc_indented() to preserve indentation on all subsequent text
>> > lines, and create a compatibility dedent() function for qapido
John Snow writes:
> We do not need a dedicated section for notes. By eliminating a specially
> parsed section, these notes can be treated as normal rST paragraphs in
> the new QMP reference manual, and can be placed and styled much more
> flexibly.
>
> Convert all existing "Note" and "Notes"
Markus Armbruster writes:
> John Snow writes:
[...]
>> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
>> index b3de1fb6b3a..57598331c5c 100644
>> --- a/qga/qapi-schema.json
>> +++ b/qga/qapi-schema.json
[...]
>> @@ -631,8 +632,8 @@
>>
John Snow writes:
> Eliminate the "Example" sections in QAPI doc blocks, converting them
> into QMP example code blocks. This is generally done in this patch by
> converting "Example:" or "Examples:" lines into ".. code-block:: QMP"
> lines.
>
> The old "Example:" or "Examples:" syntax is now
John Snow writes:
> We do not need a dedicated section for notes. By eliminating a specially
> parsed section, these notes can be treated as normal rST paragraphs in
> the new QMP reference manual, and can be placed and styled much more
> flexibly.
>
> Convert all existing "Note" and "Notes"
John Snow writes:
> The double-colon synax is rST formatting that precedes a literal code
> block. We do not want to capture these as QAPI-specific sections.
>
> Coerce blocks that start with e.g. "Example::" to be parsed as untagged
> paragraphs instead of special tagged sections.
>
>
John Snow writes:
> We do not need a dedicated section for notes. By eliminating a specially
> parsed section, these notes can be treated as normal rST paragraphs in
> the new QMP reference manual, and can be placed and styled much more
> flexibly.
>
> Convert all existing "Note" and "Notes"
e not yet
> adjusted here; they will be converted en masse in a subsequent patch
> after the new QAPI doc generator is merged.
>
> Signed-off-by: John Snow
Reviewed-by: Markus Armbruster
return value does not match the previous call to
> +# .. note:: If the return value does not match the previous call to
> #guest-fsfreeze-freeze, this likely means some freezable filesystems
> #were unfrozen before this call, and that the filesystem state may
> #have changed before issuing this command.
Reviewed-by: Markus Armbruster
/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 fi
elisions, but they must be represented as
> the value "...", so three examples have been adjusted to support that
> format here.
>
> Signed-off-by: John Snow
Reviewed-by: Markus Armbruster
self._parse_text_into_node(
> -dedent(section.text) if section.tag else section.text,
> -snode,
> - )
> +self._parse_text_into_node(dedent(section.text), snode)
> nodelist.append(snode)
> return nodelist
Acked-by: Markus Armbruster
46af 100644
> --- a/tests/qapi-schema/doc-good.json
> +++ b/tests/qapi-schema/doc-good.json
> @@ -55,6 +55,8 @@
> # - {braces}
> ##
>
> +# Not a doc comment
> +
> ##
> # @Enum:
> #
Reviewed-by: Markus Armbruster
e_colon(string: str) ->
> Optional[Match[str]]:
> return re.match(r'@([^:]*): *', string)
>
> def get_doc_indented(self, doc: 'QAPIDoc') -> Optional[str]:
> +"""get_doc_indented preserves indentation for later rST parsing."""
A proper function comment explains what the function does. This one
merely points out one minor aspect. Easy fix: delete it. Alternative
fix: write a proper function comment.
> self.accept(False)
> line = self.get_doc_line()
> while line == '':
[...]
Just commit message and doc nitpicks, so
Reviewed-by: Markus Armbruster
1 - 100 of 3252 matches
Mail list logo