From 11be796c9b15b1943a5aa81d794ef7e157091725 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Wed, 12 Aug 2020 15:17:15 -0400 Subject: [PATCH] cli/doctor: warn if native JSON library is missing --- core/cli/doctor.el | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/core/cli/doctor.el b/core/cli/doctor.el index b5422cc1b..1d838f844 100644 --- a/core/cli/doctor.el +++ b/core/cli/doctor.el @@ -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")