Fix qapi mangling of downstream names
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest16 patches 11 repliesIn review
- v314 patches 10 repliesApplied
- v24 patches 10 repliesSuperseded
Patches in v4 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/16 | qapi: Fix C identifiers generated for names containing '.'scripts/ | +5 | 0 replies | |
| 2/16 | qapi: Rename identical c_fun()/c_var() into c_name()scripts/ scripts/ scripts/ +2 more | +36 | 0 replies | |
| 3/16 | qapi: Rename _generate_enum_string() to camel_to_upper()scripts/ | +6 | 0 replies | |
| 4/16 | qapi: Rename generate_enum_full_value() to c_enum_const()scripts/ scripts/ scripts/ +1 more | +10 | 0 replies | |
| 5/16 | qapi: Simplify c_enum_const()scripts/ | +1 | 2 replies | |
| 6/16 | qapi: Use c_enum_const() in generate_alternate_qtypes()scripts/ scripts/ | +2 | 0 replies | |
| 7/16 | qapi: Move camel_to_upper(), c_enum_const() to closely related codescripts/ | +25 | 0 replies | |
| 8/16 | qapi: Tidy c_type logicscripts/ | +30 | 3 replies | |
| 9/16 | qapi: Make c_type() consistently convert qapi namesscripts/ | +29 | 1 reply | |
| 10/16 | qapi: Support downstream enumsscripts/ scripts/ tests/ +1 more | +18 | 1 reply | |
| 11/16 | qapi: Support downstream structsscripts/ scripts/ tests/ +1 more | +18 | 0 replies | |
| 12/16 | qapi: Support downstream simple unionsscripts/ scripts/ tests/ +1 more | +10 | 0 replies | |
| 13/16 | qapi: Support downstream flat unionsscripts/ scripts/ tests/ +1 more | +13 | 0 replies | |
| 14/16 | qapi: Support downstream alternatesscripts/ scripts/ tests/ +1 more | +13 | 0 replies | |
| 15/16 | qapi: Support downstream events and commandsscripts/ tests/ tests/ +1 more | +28 | 0 replies | |
| 16/16 | qapi: Prefer '"str" + var' over '"str%s" % var'scripts/ scripts/ scripts/ +3 more | +51 | 2 replies |
Reviews trailers per patch
11 of 16 patches have a Reviewed-by or Acked-by.
| Patch | Markus Armbruster | Alberto Garcia |
|---|---|---|
| 1/16 | R-b | |
| 2/16 | R-b | |
| 3/16 | ||
| 4/16 | ||
| 5/16 | R-b | |
| 6/16 | ||
| 7/16 | ||
| 8/16 | R-b | |
| 9/16 | R-b | |
| 10/16 | R-b | |
| 11/16 | R-b | |
| 12/16 | R-b | |
| 13/16 | R-b | |
| 14/16 | R-b | |
| 15/16 | R-b | |
| 16/16 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [Qemu-devel] [PATCH v4 00/16] Fix qapi mangling of downstream names
This series makes it possible to use downstream extensions (such as __com.redhat_xyz) and temporary names (such as x-foo) in every position possible in QAPI schemes, with added tests that the generated code still compiles.
There's still some things we could do to the qapi generator, such as normalizing struct member names and C manglings and creating named implicit types up front on the initial parse rather than multiple times in each backend. But that should wait until existing pending patches have landed, to minimize rebase churn.
v3 was here:
https://lists.gnu.org/archive/html/qemu-devel/2015-05/msg00519.html
[already queued in Markus tree, but not yet in a pull request, so that queue can be ruthlessly rebased]
v4 includes 2 new patches (although 14/14 is somewhat unrelated, and could easily be dropped from the series if it needs another spin without holding up the rest of the series), incorporates Markus' suggestions for more comments, and simplifies special-casing of lists of builtin types.
Here's the backport-diff stats (and note that it exposes a bug in the script, as a raw % in the subject line triggered mayhem):
001/16:[----] [--] 'qapi: Fix C identifiers generated for names containing '.'' 002/16:[----] [--] 'qapi: Rename identical c_fun()/c_var() into c_name()' 003/16:[----] [--] 'qapi: Rename _generate_enum_string() to camel_to_upper()' 004/16:[----] [--] 'qapi: Rename generate_enum_full_value() to c_enum_const()' 005/16:[----] [--] 'qapi: Simplify c_enum_const()'
006/16:[----] [--] 'qapi: Use c_enum_const() in generate_alternate_qtypes()' 007/16:[----] [--] 'qapi: Move camel_to_upper(), c_enum_const() to closely related code' 008/16:[down] 'qapi: Tidy c_type logic'
009/16:[0046] [FC] 'qapi: Make c_type() consistently convert qapi names' 010/16:[0007] [FC] 'qapi: Support downstream enums'
011/16:[----] [--] 'qapi: Support downstream structs'
012/16:[----] [--] 'qapi: Support downstream simple unions'
013/16:[----] [--] 'qapi: Support downstream flat unions'
014/16:[----] [--] 'qapi: Support downstream alternates'
015/16:[----] [--] 'qapi: Support downstream events and commands' /home/eblake/bin/git-backport-diff: line 267: printf: `v': invalid format character 016/16:[down] 'qapi: Prefer '"str" + var' over '"str"
Eric Blake (10):
qapi: Rename identical c_fun()/c_var() into c_name()
qapi: Tidy c_type logic
qapi: Make c_type() consistently convert qapi names
qapi: Support downstream enums
qapi: Support downstream structs
qapi: Support downstream simple unions
qapi: Support downstream flat unions
qapi: Support downstream alternates
qapi: Support downstream events and commands
qapi: Prefer '"str" + var' over '"str%s" % var'
Markus Armbruster (6):
qapi: Fix C identifiers generated for names containing '.'
qapi: Rename _generate_enum_string() to camel_to_upper()
qapi: Rename generate_enum_full_value() to c_enum_const()
qapi: Simplify c_enum_const()
qapi: Use c_enum_const() in generate_alternate_qtypes()
qapi: Move camel_to_upper(), c_enum_const() to closely related code
scripts/qapi-commands.py | 56 ++++---- scripts/qapi-event.py | 15 +-- scripts/qapi-types.py | 54 ++++---- scripts/qapi-visit.py | 55 ++++---- scripts/qapi.py | 226 +++++++++++++++++--------------- tests/qapi-schema/include-non-file.err | 2 +- tests/qapi-schema/qapi-schema-test.json | 20 +++ tests/qapi-schema/qapi-schema-test.out | 21 ++- tests/test-qmp-commands.c | 15 +++ 9 files changed, 263 insertions(+), 201 deletions(-)
Signature · 1 line
2.1.0