[Top][All Lists]

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

Re: [PATCH v2 11/15] qemu-common: move scripts/qapi

From: Marc-André Lureau
Subject: Re: [PATCH v2 11/15] qemu-common: move scripts/qapi
Date: Thu, 11 Aug 2022 11:11:15 +0400


On Thu, Aug 11, 2022 at 10:52 AM Markus Armbruster <armbru@redhat.com> wrote:
Marc-André Lureau <marcandre.lureau@gmail.com> writes:

> Hi
> On Fri, Aug 5, 2022 at 12:12 PM Markus Armbruster <armbru@redhat.com> wrote:
>> marcandre.lureau@redhat.com writes:
>> > From: Marc-André Lureau <marcandre.lureau@redhat.com>
>> >
>> > This is just moving qapi-gen.py and related subdir to qemu-common, to
>> > ease review and proceed step by step. The following patches will move
>> > related necessary code, tests etc.
>> >
>> > Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
>> As moved files tend to become low-level annoyances for a long time, I'd
>> like to understand why you want to move them.  The commit message says
>> "to ease review", which I suspect isn't the real reason.  Perhaps you
>> explained all that elsewhere already, but I missed it.
> The end goal is to split some projects, such as qemu-ga, to standalone
> meson projects/subprojects. We will be able to build them independently
> from the rest of QEMU, and later on perhaps handle them outside of QEMU
> main repository. To achieve this, I first introduce a qemu-common
> subproject, where qapi and common units are provided. You can check
> https://gitlab.com/marcandre.lureau/qemu/-/commits/qga for a sneak peek at
> current end result.

I worry this move of the QAPI generator code into
subjprojects/common/scripts/qapi/ will be followed by a move into its
own subproject.

Do you mean: it could be moved again to another smaller subproject? not really, see below
Ignorant question: could we turn the QAPI generator into a subproject in

If it's just the generator, probably the target would then be a python project (not meson), similar to python-qemu-qmp.
But I don't see much point, since it's not really a standalone python module, it generates code, and that code needs most of what is in qemu-common (see https://gitlab.com/marcandre.lureau/qemu/-/tree/qga/subprojects/qemu-common). It's best to have it together imho. Maybe we can consider a different naming or to be more careful not to add stuff that is not strictly needed by qapi?

(fwiw, it's a bit of a shame python-qemu-qmp didn't import git history from qemu.. we did better with libslirp. If we ever move code in standalone repositories again, we should be careful to keep history with it)

> I said "to ease review and proceed step by step" simply because there are
> no other changes: I don't move the rest of the qapi code & tests all
> together, it's in the subsequent series.

I'd recommend to provide a bit more context in the commit message, even
if you copy it to several messages in a row.  Our future selves will
likely be grateful.

Marc-André Lureau

reply via email to

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