cli/doctor: warn if native JSON library is missing

This commit is contained in:
Henrik Lissner 2020-08-12 15:17:15 -04:00
parent ca7a18f3c6
commit 11be796c9b
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -59,6 +59,16 @@ in."
"typically installed. If you're seeing a vanilla Emacs splash screen, this "
"may explain why. If you use Chemacs, you may ignore this warning."))
(when EMACS27+
(print! (start "Checking for great Emacs features..."))
(unless (and (functionp 'json-serialize)
(string-match-p "\\<_JSON\\_>" system-configuration-features))
(warn! "Emacs was not built with native JSON support")
(explain! "Users will see a substantial performance gain by building Emacs with "
"jansson support (i.e. a native JSON library), particularly LSP users. "
"You must install a prebuilt Emacs binary with this included, or compile "
"Emacs with the --with-json option.")))
(print! (start "Checking for private config conflicts..."))
(let ((xdg-dir (concat (or (getenv "XDG_CONFIG_HOME")
"~/.config")