From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44286) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YssbW-0001yS-Sh for qemu-devel@nongnu.org; Thu, 14 May 2015 08:51:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YssbT-0002mA-J8 for qemu-devel@nongnu.org; Thu, 14 May 2015 08:51:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53602) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YssbT-0002la-Ba for qemu-devel@nongnu.org; Thu, 14 May 2015 08:51:07 -0400 From: Eric Blake Date: Thu, 14 May 2015 06:50:46 -0600 Message-Id: <1431607862-9238-1-git-send-email-eblake@redhat.com> Subject: [Qemu-devel] [PATCH v4 00/16] Fix qapi mangling of downstream names List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, akong@redhat.com, berto@igalia.com, armbru@redhat.com, mdroth@linux.vnet.ibm.com 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(-) -- 2.1.0