GNU bug report logs -
#55278
29.0.50; OSM package
Previous Next
Reported by: rms <at> gnu.org
Date: Thu, 5 May 2022 18:39:02 UTC
Severity: normal
Tags: notabug
Found in version 29.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #39 received at 55278 <at> debbugs.gnu.org (full text, mbox):
On 5/9/22 12:27, Lars Ingebrigtsen wrote:
> Richard Stallman <rms <at> gnu.org> writes:
>
>> I agree that we should implement some built-in fallback mechanism
>> so that it works for all packages that use json parsing.
>
> The two libraries aren't really compatible without reparsing the entire
> parse tree returned by them. For instance, the C library returns:
The json-parse-string implementation in compat.el should be compatible
as far as I understood Philip and it relies on json.el.
> Libraries like osm.el depend on the former type, and it parses a lot of
> data, making compat transformations prohibitively slow. We'd be doing
> our users a disservice if we were to just be slow here instead of
> telling them the real story: Build your Emacs with jansson support,
> already. (This happens by default if you have the library installed.)
Yes, that's a good point. Should we rather bail out or try to do our
best by falling back to a slower implementation? For example eww bails
out if libxml is missing, probably rightly so.
In osm-mode I have a list of requirements which must be satisfied before
it can be used reasonably. These requirements are also listed in the
README and in the Commentary of the package.
(unless (display-graphic-p)
(warn "osm: Graphical display is required"))
(dolist (type '(svg jpeg png))
(unless (image-type-available-p type)
(warn "osm: Support for %s images is missing" type)))
(unless (libxml-available-p)
(warn "osm: libxml is not available"))
(unless (ignore-errors (equal [] (json-parse-string "[]")))
(warn "osm: libjansson is not available"))
Daniel
This bug report was last modified 3 years and 8 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.