From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48924) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8p0y-0004lk-TU for qemu-devel@nongnu.org; Wed, 18 Apr 2018 11:28:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8p0u-0006Mb-TI for qemu-devel@nongnu.org; Wed, 18 Apr 2018 11:28:56 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35940 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f8p0u-0006MQ-Nn for qemu-devel@nongnu.org; Wed, 18 Apr 2018 11:28:52 -0400 Date: Wed, 18 Apr 2018 16:28:41 +0100 From: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= Message-ID: <20180418152841.GZ27579@redhat.com> Reply-To: Daniel =?utf-8?B?UC4gQmVycmFuZ8Op?= References: <20180417224054.26363-1-lersek@redhat.com> <762b3dc8-a86f-a21f-1e21-334ec46677ef@redhat.com> <20180418120320.GH27579@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [qemu RFC v2] qapi: add "firmware.json" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Laszlo Ersek Cc: Eric Blake , Paolo Bonzini , qemu-devel@nongnu.org, libvir-list@redhat.com, Alexander Graf , Ard Biesheuvel , David Gibson , Gary Ching-Pang Lin , Gerd Hoffmann , Kashyap Chamarthy , Markus Armbruster , Michael Roth , Michal Privoznik , Peter Krempa , Peter Maydell , Thomas Huth On Wed, Apr 18, 2018 at 05:27:32PM +0200, Laszlo Ersek wrote: > On 04/18/18 17:17, Eric Blake wrote: > > On 04/18/2018 07:40 AM, Laszlo Ersek wrote: > > > >> Is it guaranteed that lists in JSON keep the order of the elements? > >> Because, dictionaries definitely don't promise any ordering between the > >> keys. > > > > Yes, JSON lists preserve order (and we have to explicitly document cases > > where order within a list is not significant). > > > > Thanks. > > After digesting the comments on @type for a while longer, from Dan, Gerd > and Paolo, I think we *should* keep @type, but rather than having it be > a simple enum, let's make it a list of enums, where order matters. Keep > @features separate, and document that order does not matter there. > > Here's why: my brain is crashing trying to come up with a > human-parseable explanation why for *some* entries in @features, their > relative order is important, and why for some others, it isn't. > Discerning the subset for which order matters, from any specific > grab-bag of @features, will be no fun for the human user. > > Given that the "ordered features" idea was brought to life solely > because a firmware can provide multiple interfaces (with a strong > preference order between them), I guess we might as well be honest about > that, and update @type accordingly. > > Thoughts? :) Keeping type separate from features is fine by me. Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|