qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 07/29] qapi: Turn generators into modules


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 07/29] qapi: Turn generators into modules
Date: Tue, 27 Feb 2018 09:53:22 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0

On 02/11/2018 03:35 AM, Markus Armbruster wrote:
The next commit will introduce a common driver program for all
generators.  The generators need to be modules for that.  qapi2texi.py
already is.  Make the other generators follow suit.

The changes are actually trivial.  Obvious in the diffs once you view
them with whitespace changes ignored.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
---
  scripts/qapi-commands.py   | 43 ++++++++++++++++++--------------
  scripts/qapi-event.py      | 43 ++++++++++++++++++--------------
  scripts/qapi-introspect.py | 54 ++++++++++++++++++++++------------------
  scripts/qapi-types.py      | 56 ++++++++++++++++++++++-------------------
  scripts/qapi-visit.py      | 62 +++++++++++++++++++++++++---------------------
  5 files changed, 143 insertions(+), 115 deletions(-)

Urgh. One annoyance of this patch is that if you switch to another branch without the patch, leftover .pyc files in the source tree can cause weird errors until you 'rm -f scripts/qapi/*.pyc':

$ make -j3
  GEN     config-host.h
  GEN     qmp-commands.h
  GEN     qapi-types.h
Traceback (most recent call last):
  File "/home/eblake/qemu/scripts/qapi-commands.py", line 225, in <module>
    class QAPISchemaGenCommandVisitor(QAPISchemaVisitor):
NameError: name 'QAPISchemaVisitor' is not defined
Traceback (most recent call last):
  File "/home/eblake/qemu/scripts/qapi-types.py", line 168, in <module>
    class QAPISchemaGenTypeVisitor(QAPISchemaVisitor):
NameError: name 'QAPISchemaVisitor' is not defined
make: *** [Makefile:522: qapi-types.h] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:537: qmp-commands.h] Error 1

Not a show-stopper, but annoying when toggling between branches.

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]