From f9ffb8dc94218c040b64cf798e3ca5ebb39c8c28 Mon Sep 17 00:00:00 2001 From: lawr Date: Wed, 29 Apr 2020 19:01:16 +0800 Subject: [PATCH] Avoid unnecessary packages installation of tern layer Fixes #13530 --- CHANGELOG.develop | 1 + layers/+frameworks/react/layers.el | 2 +- layers/+lang/javascript/layers.el | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.develop b/CHANGELOG.develop index b370f5e91e32..8173739e733e 100644 --- a/CHANGELOG.develop +++ b/CHANGELOG.develop @@ -655,6 +655,7 @@ Other: (thanks to Matt Kramer) - Replace =spacemacs/close-compilation-window= with =spacemacs/show-hide-compilation-window= (thanks to Hans Jang) + - Avoid unnecessary packages installation of tern layer - Other: - New function =configuration-layer/message= to display message in =*Messages*= buffer (thanks to Sylvain Benner) diff --git a/layers/+frameworks/react/layers.el b/layers/+frameworks/react/layers.el index 81e56323e992..750a43b61011 100644 --- a/layers/+frameworks/react/layers.el +++ b/layers/+frameworks/react/layers.el @@ -9,4 +9,4 @@ ;; ;;; License: GPLv3 -(configuration-layer/declare-layer-dependencies '(javascript node prettier tern web-beautify)) +(configuration-layer/declare-layer-dependencies '(javascript node prettier web-beautify)) diff --git a/layers/+lang/javascript/layers.el b/layers/+lang/javascript/layers.el index b231f6307bf6..4fd1be951ae4 100644 --- a/layers/+lang/javascript/layers.el +++ b/layers/+lang/javascript/layers.el @@ -9,8 +9,10 @@ ;; ;;; License: GPLv3 -(configuration-layer/declare-layer-dependencies '(json node prettier tern web-beautify)) +(configuration-layer/declare-layer-dependencies '(json node prettier web-beautify)) -(when (and (boundp 'javascript-backend) - (eq javascript-backend 'lsp)) - (configuration-layer/declare-layer-dependencies '(lsp))) +(when (boundp 'javascript-backend) + (pcase javascript-backend + ('lsp (configuration-layer/declare-layer-dependencies '(lsp))) + ('tide (configuration-layer/declare-layer-dependencies '(tide))) + ('tern (configuration-layer/declare-layer-dependencies '(tern)))))