All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH 5/5] json-parser: add location to JSON parsing errors
Date: Wed, 11 Feb 2026 08:18:22 +0100	[thread overview]
Message-ID: <87seb73g01.fsf@pond.sub.org> (raw)
In-Reply-To: <f5cfed0d-3425-4bdc-90f7-1dd2fa33b448@redhat.com> (Paolo Bonzini's message of "Tue, 10 Feb 2026 10:44:31 +0100")

Paolo Bonzini <pbonzini@redhat.com> writes:

> On 2/10/26 10:21, Markus Armbruster wrote:
>>> - *
>>> - * 0) make errors meaningful again
>> 
>> The errors weren't meaningless, just bad.  The "again" is kind of funny,
>> considering it's the initial commit.
>> 
>> I agree with removing the line, but i wonder what exactly improved
>> beyond line and column ("geometry information").
>
> I think it's more of a reference to the error recovery.  There's only so 
> many ways to report errors for a grammar as simple as JSON.

Point!

> But just for kicks I looked at the very first implementation and the 
> current state, and diff-ed the errors.  These are the differences:
>
> renamed:
> "expected separator in dict" -> "expected ',' or '}'"
> "expected separator in list" -> "expected ',' or ']'"
> "missing : in object pair" -> "expected ':'"
>
> removed (merged with "expecting value" or "premature end of input"):
> "Missing value in dict"
>
> split (out of just "expecting value"):
> "invalid interpolation '%s'"

Improvements.

> new errors:
> "can't interpolate into string"
> "%.*s is not a valid Unicode character"
> "duplicate key"
> "invalid UTF-8 sequence in string"
> "premature end of input"

Bug fixes :)

Thanks!

> So I don't know if they're "meaningful again", but there were some 
> changes over the years and the current set seems good enough to me!

Yes.  And further improvement, if desired, wouldn't be this series' job
anyway.



  reply	other threads:[~2026-02-11  7:18 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07  8:48 [PATCH 0/5] qobject: switch JSON parser to push Paolo Bonzini
2026-01-07  8:48 ` [PATCH 1/5] json-parser: pass around lookahead token, constify Paolo Bonzini
2026-02-06 10:45   ` Markus Armbruster
2026-02-06 10:54     ` Paolo Bonzini
2026-01-07  8:48 ` [PATCH 2/5] json-parser: replace with a push parser Paolo Bonzini
2026-02-09  9:36   ` Markus Armbruster
2026-02-09 10:53     ` Paolo Bonzini
2026-02-12 13:12       ` Markus Armbruster
2026-02-16 16:41         ` Paolo Bonzini
2026-02-17  7:39           ` Markus Armbruster
2026-01-07  8:48 ` [PATCH 3/5] json-streamer: remove token queue Paolo Bonzini
2026-02-10  7:58   ` Markus Armbruster
2026-02-10  8:22     ` Paolo Bonzini
2026-02-11  7:13       ` Markus Armbruster
2026-01-07  8:48 ` [PATCH 4/5] json-streamer: do not heap-allocate JSONToken Paolo Bonzini
2026-02-10  8:30   ` Markus Armbruster
2026-01-07  8:48 ` [PATCH 5/5] json-parser: add location to JSON parsing errors Paolo Bonzini
2026-02-10  9:21   ` Markus Armbruster
2026-02-10  9:44     ` Paolo Bonzini
2026-02-11  7:18       ` Markus Armbruster [this message]
2026-01-21  5:57 ` [PATCH 0/5] qobject: switch JSON parser to push Paolo Bonzini
2026-01-30 13:00 ` Markus Armbruster
2026-01-30 13:36   ` Paolo Bonzini
2026-02-10 13:06     ` Markus Armbruster
2026-02-10 13:12       ` Paolo Bonzini
2026-02-10 15:52         ` Markus Armbruster

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=87seb73g01.fsf@pond.sub.org \
    --to=armbru@redhat.com \
    --cc=pbonzini@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.