From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhfPF-0004iZ-7M for qemu-devel@nongnu.org; Tue, 06 May 2014 09:27:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WhfP9-0005p5-Mt for qemu-devel@nongnu.org; Tue, 06 May 2014 09:27:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23280) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WhfP9-0005or-Fc for qemu-devel@nongnu.org; Tue, 06 May 2014 09:27:31 -0400 Date: Tue, 6 May 2014 09:27:25 -0400 From: Luiz Capitulino Message-ID: <20140506092725.4c195cbd@redhat.com> In-Reply-To: <20140506130740.GA17717@irqsave.net> References: <20140502135218.31383.90270.stgit@fimbulvetr.bsc.es> <20140506130740.GA17717@irqsave.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH v12 0/4] qapi: Allow modularization of QAPI schema files List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?B?QmVub8OudA==?= Canet Cc: Markus Armbruster , =?UTF-8?B?TGx1w61z?= Vilanova , qemu-devel@nongnu.org On Tue, 6 May 2014 15:07:40 +0200 Beno=C3=AEt Canet wrote: > I am trying to use this series to modularise the block API. >=20 > Here are my finding. >=20 > I tried to make a qmp/block.json including VM state related API. > block.json include a qmp/block-core.json containing only true block stuff. >=20 > When generating and compiling block-core.json to link it with qemu-nbd > I saw that some of the block stuff needed ErrorClass so I went the route > of creating a qmp/common.json containing ErrorClass. >=20 > common.json being included in block-core.json and in qapi-schema.json it > quickly lead some code being generated in double and the compilation to c= hoke. >=20 > What do you think would be the best solution to fix this ? > (Fix the generator ? Make include ignore second inclusion of the same fil= e ?) Make qapi-schema.json a sort of master file and include everything? Eventually, we might want to have if/defs and whatnot. But having a master file seems a reasonable first step to me. I actually thought this was the intention. Unless I got it wrong, of course.