This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-02
Channels
- # babashka (37)
- # beginners (19)
- # calva (5)
- # cider (14)
- # clojure (21)
- # clojure-europe (2)
- # clojurescript (16)
- # conjure (11)
- # datalog (78)
- # deps-new (3)
- # gratitude (2)
- # introduce-yourself (1)
- # joker (1)
- # jvm (4)
- # lsp (17)
- # malli (5)
- # meander (6)
- # minecraft (3)
- # off-topic (17)
- # other-languages (25)
- # practicalli (1)
- # quil (12)
- # reveal (6)
- # spacemacs (19)
i'm trying to get a clj/spacemacs set up going, and I think my install is broken somehow. helm-cider tries to load a feature from cider cider-compat
, which seems to have been removed from cider itself. i checked helm-cider on gh and the (require 'cider-compat)
is still in the codebase? whaddoido‽ any help or ideas are much appreciated.
also my isn't starting which i assume is related because the cider-compat bug happens on buffer load.
@cwmckenzie02 I haven't seen this issue before. If installing Spacemacs for the first time, there is not much to go wrong (except packages failing to download). Adding Clojure only needs clojure added to the layer list
Assuming Emacs was restarted after all the initial packages were downloaded, I would delete all the cider packages from /.emacs.d/elpa/ directory tree (or the /.emacs.d/elpa/ directory itself if there is a fast internet connection) and restart Emacs
Here is a general troubleshooting guide
https://practical.li/spacemacs/install-spacemacs/troubleshooting.html
I assume that Java and Clojure (Clojure CLI or Leiningen) have already been installed and tested they work https://practical.li/spacemacs/before-you-start/
@cwmckenzie02 it seems like there is a bug with helm cider. It's relying on a piece of code that no longer exists. https://clojurians.slack.com/archives/C0617A8PQ/p1641081555031900
oh weird?
i did update stuff today, but i remember seeing that the file was removed a while ago. i'll have a look at git blame and see when the file was removed maybe?
For anyone updating packages from the 29th December onward, there is a bug in the helm-cider package caused by a change in cider.
Cider has dropped the cider-compat namespace which helm-cider requires (unneccessarily), preventing Emacs from loading Clojure files correctly. I've https://github.com/clojure-emacs/helm-cider/issues/12
Options for a temporary fix
1. Edit ~/.emacs.d/elpa/27.1/develop/helm-cider-20180307.458/helm-cider-spec.el
and comment line 16 that says (require 'cider-compat)
or just delete that line. The package hasnt changed for several years, so this should only need to be done once
2. Pin cider to an earlier version (or use a back up from before 29th December) by adding the following to dotspacemacs/additional-packages
- you will need to delete the package cider-20220102.936
clojure-mode-20211119.1904
and cider-eval-sexp-fu-20190311.2152
from ~/.emacs.d/elpa/
and comment out cider or (cider ,,,) from the layer list (as that will automatically download the latest version)
(cider :location
(recipe :fetcher github
:repo "clojure-emacs/cider"
:commit "ae376429a8cf22b82a9e18ff844bdfbe5fc7ecc1"))
Restart and the pinned version of Cider will be installed.
If you have clojure variables set in the layer list, then you can uncomment them and restart for those to take effect (this will not update the package, that will only be done if using SPC f e U
)The helm-cider package has been updated to remove the issue and its package is available on Melpa - so it will be included in the Spacemacs package update, SPC f e U
Thanks to Bozhidar for a speedy response.
@cwmckenzie02 this https://github.com/clojure-emacs/cider/commit/c60598fa4df6cdd3331c29b8e319cc23de1b7cc6 removes cider-compat.
ya i just saw that
thanks!
Simplest thing seems to be to remove the line from the helm-cider package. I'll raise a PR and see if that gets accepted
on the helm-cider repository
yep that works
and it did pull down the lsp binary once that was out of the way
thanks again!
@cwmckenzie02 If this is the first time using LSP, you may find this useful https://emacs-lsp.github.io/lsp-mode/tutorials/how-to-turn-off/
I've set some of these options in the dotspacemacs-configuration-layers section
(lsp :variables
;; Formatting and indentation
lsp-enable-on-type-formatting t
;; Set to nil to use CIDER features instead of LSP UI
lsp-enable-indentation t
lsp-enable-snippet t
;; `lsp-toggle-symbol-highlight` toggles highlighting
;; subtle highlighting for doom-gruvbox-light theme defined in dotspacemacs/user-config
lsp-enable-symbol-highlighting t
;; Show lint error indicator in the mode line
;; lsp-modeline-diagnostics-enable t ;; default
;; lsp-modeline-diagnostics-scope ':workspace ;; default
;; popup documentation boxes
lsp-ui-doc-enable t ;; documentation popups
lsp-ui-doc-show-with-cursor nil ;; doc popup triggered by cursor
lsp-ui-doc-show-with-mouse nil ;; doc popup triggered by mouse
lsp-ui-doc-delay 1 ;; delay in seconds for popup to display
lsp-ui-doc-include-signature t ;; include function signature
;; lsp-ui-doc-position 'at-point ;; top bottom at-point
;; lsp-ui-doc-alignment 'window ;; frame window
;; code actions and diagnostics text as right-hand side of buffer
;; disabling this feature only works in dotspacemacs/user-config
lsp-ui-sideline-enable nil
lsp-ui-sideline-show-code-actions nil
;; lsp-ui-sideline-delay 500
;; lsp-ui-sideline-show-diagnostics nil
;; function reference count and test coverage
lsp-lens-enable t
;; Efficient use of space in treemacs-lsp display
treemacs-space-between-root-nodes nil
;; Optimization for large files
lsp-file-watch-threshold 10000
lsp-log-io nil)
The helm-cider package has been updated to remove the issue and its package is available on Melpa - so it will be included in the Spacemacs package update, SPC f e U
Thanks to Bozhidar for a speedy response.