From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: Markus Armbruster <armbru@redhat.com>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] QMP accepts double dict keys
Date: Tue, 4 Dec 2018 10:24:09 +0000 [thread overview]
Message-ID: <20181204102409.GD20360@redhat.com> (raw)
In-Reply-To: <de1686a3-1981-442d-a82a-704bca834922@redhat.com>
On Mon, Dec 03, 2018 at 01:57:13PM -0600, Eric Blake wrote:
> On 12/3/18 1:48 PM, Markus Armbruster wrote:
> > Eric Blake <eblake@redhat.com> writes:
> >
> > > On 12/3/18 10:30 AM, Max Reitz wrote:
> > > > Hi,
> > > >
> > > > QMP accepts double keys in dicts without complaining. The value it is
> > > > using is apparently the last one specified:
> > >
> > > JSON says it is undefined what happens when a client passes double
> > > keys. We are probably best off if we teach our parser to be strict and
> > > reject doubled keys in QMP as invalid.
> >
> > Not bug-compatible. Do we care?
>
> I don't think so. Such a client was already invoking undefined behavior.
> Relying on first- or last-past-the-post to win is not portable, since JSON
> parsers are allowed to use hash tables with non-deterministic lookups. I
> think erroring out is nicer than silently accepting one thing, especially if
> that might have been different than what the client (incorrectly) expected.
> I'm not even sure that we would want a deprecation period.
Erroring out immediately, without any deprecation period sounds fine
to me, as this is simply a bug fix.
IMHO the ABI/API compatibility stability only applies to things that
are intended behaviour / correct usage.
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 :|
next prev parent reply other threads:[~2018-12-04 10:24 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-03 16:30 [Qemu-devel] QMP accepts double dict keys Max Reitz
2018-12-03 16:36 ` Eric Blake
2018-12-03 19:48 ` Markus Armbruster
2018-12-03 19:57 ` Eric Blake
2018-12-04 10:24 ` Daniel P. Berrangé [this message]
2018-12-05 12:17 ` Dr. David Alan Gilbert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181204102409.GD20360@redhat.com \
--to=berrange@redhat.com \
--cc=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=mreitz@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).