Skip to content

qapi: Schema language cleanups & doc improvements

Markus Armbruster qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest16 patches 7 repliesIn review
  2. v216 patches 31 repliesSuperseded
  3. v19 patches 1 replySuperseded

Changes in v3 from the cover letter

* PATCH 05
- Typo fixed [Eric]
* PATCH 06+07
- Additional comments [Eric]
* PATCH 11
- Replace one more QAPISchemaMember by QAPISchemaEnumMember
* PATCH 13+15
- Doc phrasing tweaks [Eric]
* PATCH 14+15
- Belatedly update for v2's restriction to printable ASCII [Eric]
- Correct claim "order of top-level expression doesn't matter" [Eric]
* PATCH 15
- Fix EBNF for PRAGMA [Eric]

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16scripts/git.orderfile: Match QAPI schema more preciselyscripts/git.orderfile+2 -20 replies
2/16qapi: Drop check_type()'s redundant parameter @allow_optionalscripts/qapi/common.py+8 -90 replies
3/16qapi: Drop support for boxed alternate argumentsdocs/devel/qapi-code-gen.txt scripts/qapi/common.py tests/qapi-schema/qapi-schema-test.json +1 more+12 -190 replies
4/16docs/devel/qapi-code-gen: Minor specification fixesdocs/devel/qapi-code-gen.txt+16 -180 replies
5/16tests/qapi-schema: Demonstrate bad reporting of funny characterstests/qapi-schema/enum-bad-name.err tests/qapi-schema/enum-bad-name.json+3 -20 replies
6/16qapi: Restrict strings to printable ASCIIscripts/qapi/common.py tests/Makefile.include tests/qapi-schema/string-code-point-127.err +9 more+20 -210 replies
7/16qapi: Drop support for escape sequences other than \\scripts/qapi/common.py tests/Makefile.include tests/qapi-schema/escape-outside-string.err +16 more+7 -601 reply
8/16qapi: Permit 'boxed' with empty typescripts/qapi/commands.py scripts/qapi/common.py scripts/qapi/events.py +8 more+19 -250 replies
9/16qapi: Permit alternates with just one branchscripts/qapi/common.py tests/qapi-schema/alternate-empty.err tests/qapi-schema/alternate-empty.json +2 more+12 -100 replies
10/16qapi: Permit omitting all flat union branchesdocs/devel/qapi-code-gen.txt scripts/qapi/common.py tests/qapi-schema/flat-union-empty.err +5 more+27 -142 replies
11/16qapi: Adjust frontend errors to say enum value, not memberscripts/qapi/common.py scripts/qapi/events.py tests/qapi-schema/enum-clash-member.err +1 more+11 -60 replies
12/16docs/devel/qapi-code-gen: Reorder sections for readabilitydocs/devel/qapi-code-gen.txt+221 -2150 replies
13/16docs/devel/qapi-code-gen: Rewrite compatibility considerationsdocs/devel/qapi-code-gen.txt+60 -351 reply
14/16docs/devel/qapi-code-gen: Rewrite introduction to schemadocs/devel/qapi-code-gen.txt+48 -590 replies
15/16docs/devel/qapi-code-gen: Improve QAPI schema language docdocs/devel/qapi-code-gen.txt+372 -2240 replies
16/16qapi: Tweak code to match docs/devel/qapi-code-gen.txtscripts/qapi/common.py tests/qapi-schema/args-invalid.err tests/qapi-schema/doc-missing.err +4 more+18 -180 replies

Reviews trailers per patch

All 16 patches have a Reviewed-by or Acked-by.

PatchEric BlakePhilippe Mathieu-Daudé
1/16R-b
2/16R-b
3/16R-b
4/16R-b
5/16R-b
6/16R-b
7/16R-b
8/16R-b
9/16R-b
10/16R-b
11/16R-b
12/16R-b
13/16R-b
14/16R-b
15/16R-b
16/16R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v3 thread

Cover letter [Qemu-devel] [PATCH v3 00/16] qapi: Schema language cleanups & doc improvements

v3:
* PATCH 05
- Typo fixed [Eric]
* PATCH 06+07
- Additional comments [Eric]
* PATCH 11
- Replace one more QAPISchemaMember by QAPISchemaEnumMember
* PATCH 13+15
- Doc phrasing tweaks [Eric]
* PATCH 14+15
- Belatedly update for v2's restriction to printable ASCII [Eric]
- Correct claim "order of top-level expression doesn't matter" [Eric]
* PATCH 15
- Fix EBNF for PRAGMA [Eric]

v2:
* PATCH v1 05: Dropped
* PATCH 01,05,07-11,16: New
* PATCH 03:
- Commit message typo fixed
- Assertions tightened
* PATCH 04:
- Document member name 'u' is reserved
- Drop an accidental change to section "Enumeration types"
- Typo fixed
* PATCH 06:
- Outlaw anything but printable ASCII, not just control characters
* PATCH 15:
- Adopt more convenient terminology: directive, definition
- Explanation of grammar notation missed grouping
- Drop a more text redundant with the grammar
- Drop more text redundant with section "Naming rules and reserved names"
- Turn "boxed needs data: STRING" into syntax
- Improve section "Documentation comments" some more
- Minor phrasing tweaks

Markus Armbruster (16):
scripts/git.orderfile: Match QAPI schema more precisely
qapi: Drop check_type()'s redundant parameter @allow_optional
qapi: Drop support for boxed alternate arguments docs/devel/qapi-code-gen: Minor specification fixes tests/qapi-schema: Demonstrate bad reporting of funny characters
qapi: Restrict strings to printable ASCII
qapi: Drop support for escape sequences other than \\
qapi: Permit 'boxed' with empty type
qapi: Permit alternates with just one branch
qapi: Permit omitting all flat union branches
qapi: Adjust frontend errors to say enum value, not member docs/devel/qapi-code-gen: Reorder sections for readability docs/devel/qapi-code-gen: Rewrite compatibility considerations docs/devel/qapi-code-gen: Rewrite introduction to schema docs/devel/qapi-code-gen: Improve QAPI schema language doc
qapi: Tweak code to match docs/devel/qapi-code-gen.txt

 docs/devel/qapi-code-gen.txt                  | 1071 ++++++++++-------
 tests/test-qmp-cmds.c                         |    4 +
 scripts/git.orderfile                         |    4 +-
 scripts/qapi/commands.py                      |    4 +-
 scripts/qapi/common.py                        |  147 +--
 scripts/qapi/events.py                        |   12 +-
 tests/Makefile.include                        |    7 +-
 tests/qapi-schema/alternate-empty.err         |    2 +-
 tests/qapi-schema/alternate-empty.json        |    4 +-
 tests/qapi-schema/args-boxed-empty.err        |    1 -
 tests/qapi-schema/args-boxed-empty.json       |    3 -
 tests/qapi-schema/args-invalid.err            |    2 +-
 tests/qapi-schema/doc-missing.err             |    2 +-
 tests/qapi-schema/doc-no-symbol.err           |    2 +-
 tests/qapi-schema/enum-bad-name.err           |    2 +-
 tests/qapi-schema/enum-bad-name.json          |    3 +-
 tests/qapi-schema/enum-clash-member.err       |    2 +-
 .../qapi-schema/enum-dict-member-unknown.err  |    2 +-
 tests/qapi-schema/enum-member-case.err        |    2 +-
 tests/qapi-schema/escape-outside-string.err   |    1 -
 tests/qapi-schema/escape-outside-string.json  |    3 -
 tests/qapi-schema/escape-too-big.err          |    1 -
 tests/qapi-schema/escape-too-big.exit         |    1 -
 tests/qapi-schema/escape-too-big.json         |    3 -
 tests/qapi-schema/escape-too-big.out          |    0
 tests/qapi-schema/escape-too-short.err        |    1 -
 tests/qapi-schema/escape-too-short.exit       |    1 -
 tests/qapi-schema/escape-too-short.json       |    3 -
 tests/qapi-schema/escape-too-short.out        |    0
 tests/qapi-schema/flat-union-empty.err        |    2 +-
 tests/qapi-schema/flat-union-empty.json       |    2 +-
 tests/qapi-schema/ident-with-escape.err       |    1 +
 tests/qapi-schema/ident-with-escape.exit      |    2 +-
 tests/qapi-schema/ident-with-escape.json      |    2 +-
 tests/qapi-schema/ident-with-escape.out       |   16 -
 tests/qapi-schema/pragma-non-dict.err         |    2 +-
 tests/qapi-schema/qapi-schema-test.json       |   13 +-
 tests/qapi-schema/qapi-schema-test.out        |   21 +-
 tests/qapi-schema/string-code-point-127.err   |    1 +
 ...-empty.exit => string-code-point-127.exit} |    0
 tests/qapi-schema/string-code-point-127.json  |    2 +
 ...ed-empty.out => string-code-point-127.out} |    0
 tests/qapi-schema/string-code-point-31.err    |    1 +
 ...-string.exit => string-code-point-31.exit} |    0
 tests/qapi-schema/string-code-point-31.json   |    2 +
 ...de-string.out => string-code-point-31.out} |    0
 tests/qapi-schema/struct-data-invalid.err     |    2 +-
 tests/qapi-schema/unicode-str.err             |    1 -
 tests/qapi-schema/unicode-str.exit            |    1 -
 tests/qapi-schema/unicode-str.json            |    2 -
 tests/qapi-schema/unicode-str.out             |    0
 tests/qapi-schema/union-empty.err             |    2 +-
 tests/qapi-schema/union-empty.json            |    2 +-
 tests/qapi-schema/unknown-escape.json         |    2 +-
 54 files changed, 744 insertions(+), 625 deletions(-)
 delete mode 100644 tests/qapi-schema/args-boxed-empty.err
 delete mode 100644 tests/qapi-schema/args-boxed-empty.json
 delete mode 100644 tests/qapi-schema/escape-outside-string.err
 delete mode 100644 tests/qapi-schema/escape-outside-string.json
 delete mode 100644 tests/qapi-schema/escape-too-big.err
 delete mode 100644 tests/qapi-schema/escape-too-big.exit
 delete mode 100644 tests/qapi-schema/escape-too-big.json
 delete mode 100644 tests/qapi-schema/escape-too-big.out
 delete mode 100644 tests/qapi-schema/escape-too-short.err
 delete mode 100644 tests/qapi-schema/escape-too-short.exit
 delete mode 100644 tests/qapi-schema/escape-too-short.json
 delete mode 100644 tests/qapi-schema/escape-too-short.out
 create mode 100644 tests/qapi-schema/string-code-point-127.err
 rename tests/qapi-schema/{args-boxed-empty.exit => string-code-point-127.exit} (100%)
 create mode 100644 tests/qapi-schema/string-code-point-127.json
 rename tests/qapi-schema/{args-boxed-empty.out => string-code-point-127.out} (100%)
 create mode 100644 tests/qapi-schema/string-code-point-31.err
 rename tests/qapi-schema/{escape-outside-string.exit => string-code-point-31.exit} (100%)
 create mode 100644 tests/qapi-schema/string-code-point-31.json
 rename tests/qapi-schema/{escape-outside-string.out => string-code-point-31.out} (100%)
 delete mode 100644 tests/qapi-schema/unicode-str.err
 delete mode 100644 tests/qapi-schema/unicode-str.exit
 delete mode 100644 tests/qapi-schema/unicode-str.json
 delete mode 100644 tests/qapi-schema/unicode-str.out
Signature · 1 line
2.21.0