From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bxWES-0002V9-1S for qemu-devel@nongnu.org; Fri, 21 Oct 2016 05:35:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bxWER-00077z-0l for qemu-devel@nongnu.org; Fri, 21 Oct 2016 05:35:20 -0400 From: Markus Armbruster References: <1474982001-20878-1-git-send-email-berrange@redhat.com> <87vawnnjpi.fsf@dusky.pond.sub.org> Date: Fri, 21 Oct 2016 11:35:10 +0200 In-Reply-To: <87vawnnjpi.fsf@dusky.pond.sub.org> (Markus Armbruster's message of "Thu, 20 Oct 2016 17:06:33 +0200") Message-ID: <8760om59kh.fsf@dusky.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH v14 00/19] QAPI/QOM work for non-scalar object properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Daniel P. Berrange" Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Max Reitz , Paolo Bonzini , Andreas =?utf-8?Q?F=C3=A4rber?= , Kevin Wolf Uh, replied to the wrong v14... The one I reviewed is actually v15, Message-Id: <1475246744-29302-1-git-send-email-berrange@redhat.com> http://lists.gnu.org/archive/html/qemu-devel/2016-09/msg08238.html Markus Armbruster writes: > I've warmed quite a bit to this series while reviewing it. In > particular, I've come around to like structuring the command line -> > QAPI pipeline exactly like the JSON -> QAPI pipeline, namely 1. parse > into QObject, 2. convert to QAPI with the QObject input visitor. > QObject serves as abstract syntax here. The differences between JSON > and command line result in different abstract syntax, which in turn > necessitates two cases in the input visitor. The series adds more than > two, to cater for option visitor funnies. Perhaps we can do without > some of them. > > The other way to skin this cat would be an improved options visitor. > Has its advantages and disadvantages, but the big one is that you > already did the work for QObject input visitor solution. > > The one major issue I have with the series is that it adds to the > growing body of QemuOpts hacks/workarounds. > > We've pushed QemuOpts beyond well its design limits. What started as a > simple store for scalar configuration parameters structured as key=value > lists, plus command line and configuration file syntax, has grown three > ways to specify lists (repeated keys, basically an implementation > accident that got pressed into service; special integer list syntax in > the options visitor, later adopted by the string input visitor, > hopefully compatibly; and the block layer's dotted key convention) and a > way to specify arbitrary complex values (block layer's dotted key > convention again). Of these, only "repeated keys" is in QemuOpts > proper, all the others are bolted on and used only when needed. How > they interact is not obvious. > > This series marries all the bolted-on stuff and puts it in the QObject > visitor. That's actually an improvement of sorts; at least it's in just > two places now. But it's still a smorgasbord of syntactical/semantic > options. > > I feel it's time to stop working around the design limits of QemuOpts > and start replacing them by something that serves our current needs. We > basically need the expressive power of JSON on the command line. Syntax > is debatable, but it should be *one* concrete command-line syntax, > parsed by *one* parser into *one* kind of abstract syntax tree, where > the only optional variations are the ones forced upon us by backward > compatibility. > > We can't do this for 2.8, obviously. We can try for 2.9. I have pretty > specific ideas on how it should be done, so I guess it's only fair I > give it a try myself. > > I know the block layer wants to use bits of this series to save some > coding work for certain features targeting 2.8. I have no objections as > long as it doesn't create new ABI. Exception: I'm okay with applying > dotted key convention to more of the same, e.g. new block drivers. > > Sounds sane?