Fork me on GitHub
#cider
<
2022-01-02
>
Drew Verlee00:01:35

i probalby need to remove a cache or something

Drew Verlee00:01:19

how do i get a stack trace of a line number for these errors?

Drew Verlee04:01:23

I seem to get this error when ever i load a clojure file.

Drew Verlee04:01:58

Debugger entered--Lisp error: (file-missing "Cannot open load file" "No such file or directory" "cider-compat")
  #<subr require>(cider-compat)
  apply(#<subr require> cider-compat)
  require(cider-compat)
  eval-buffer(#<buffer  *load*-421903> nil "/home/drewverlee/.emacs.d/elpa/27.2/develop/helm-c..." nil t)  ; Reading at buffer position 960
  load-with-code-conversion("/home/drewverlee/.emacs.d/elpa/27.2/develop/helm-c..." "/home/drewverlee/.emacs.d/elpa/27.2/develop/helm-c..." nil t)
  #<subr require>(helm-cider-spec)
  apply(#<subr require> helm-cider-spec)
  require(helm-cider-spec)
  eval-buffer(#<buffer  *load*> nil "/home/drewverlee/.emacs.d/elpa/27.2/develop/helm-c..." nil t)  ; Reading at buffer position 1340
  load-with-code-conversion("/home/drewverlee/.emacs.d/elpa/27.2/develop/helm-c..." "/home/drewverlee/.emacs.d/elpa/27.2/develop/helm-c..." nil t)
  helm-cider-mode()
  run-hooks(change-major-mode-after-body-hook prog-mode-hook clojure-mode-hook)
  apply(run-hooks (change-major-mode-after-body-hook prog-mode-hook clojure-mode-hook))
  run-mode-hooks(clojure-mode-hook)
  clojure-mode()
  set-auto-mode-0(clojure-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil t)
  find-file-noselect-1(#<buffer binary_boarding_5.clj> "~/Personal/aoc2020/src/binary_boarding_5.clj" nil nil "~/Personal/aoc2020/src/binary_boarding_5.clj" (17039696 2067))
  #f(compiled-function (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer.\nIf a buffer exists visiting FILENAME, return that one, but\nverify that the file has not changed since visited or saved.\nThe buffer is not selected, just returned to the caller.\nOptional second arg NOWARN non-nil means suppress any warning messages.\nOptional third arg RAWFILE non-nil means the file is read literally.\nOptional fourth arg WILDCARDS non-nil means do wildcard processing\nand visit all the matching files.  When wildcards are actually\nused and expanded, return a list of buffers that are visiting\nthe various files." #<bytecode 0x1ff7bda0be01>)("/home/drewverlee/Personal/aoc2020/src/binary_board...")
  apply(#f(compiled-function (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer.\nIf a buffer exists visiting FILENAME, return that one, but\nverify that the file has not changed since visited or saved.\nThe buffer is not selected, just returned to the caller.\nOptional second arg NOWARN non-nil means suppress any warning messages.\nOptional third arg RAWFILE non-nil means the file is read literally.\nOptional fourth arg WILDCARDS non-nil means do wildcard processing\nand visit all the matching files.  When wildcards are actually\nused and expanded, return a list of buffers that are visiting\nthe various files." #<bytecode 0x1ff7bda0be01>) "/home/drewverlee/Personal/aoc2020/src/binary_board..." nil)
  editorconfig--advice-find-file-noselect(#f(compiled-function (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer.\nIf a buffer exists visiting FILENAME, return that one, but\nverify that the file has not changed since visited or saved.\nThe buffer is not selected, just returned to the caller.\nOptional second arg NOWARN non-nil means suppress any warning messages.\nOptional third arg RAWFILE non-nil means the file is read literally.\nOptional fourth arg WILDCARDS non-nil means do wildcard processing\nand visit all the matching files.  When wildcards are actually\nused and expanded, return a list of buffers that are visiting\nthe various files." #<bytecode 0x1ff7bda0be01>) "/home/drewverlee/Personal/aoc2020/src/binary_board...")
  apply(editorconfig--advice-find-file-noselect #f(compiled-function (filename &optional nowarn rawfile wildcards) "Read file FILENAME into a buffer and return the buffer.\nIf a buffer exists visiting FILENAME, return that one, but\nverify that the file has not changed since visited or saved.\nThe buffer is not selected, just returned to the caller.\nOptional second arg NOWARN non-nil means suppress any warning messages.\nOptional third arg RAWFILE non-nil means the file is read literally.\nOptional fourth arg WILDCARDS non-nil means do wildcard processing\nand visit all the matching files.  When wildcards are actually\nused and expanded, return a list of buffers that are visiting\nthe various files." #<bytecode 0x1ff7bda0be01>) "/home/drewverlee/Personal/aoc2020/src/binary_board...")
  find-file-noselect("/home/drewverlee/Personal/aoc2020/src/binary_board...")
  mapcar(find-file-noselect ("/home/drewverlee/Personal/aoc2020/src/binary_board..."))
  (let* ((files (helm-marked-candidates)) (buffers (mapcar 'find-file-noselect files))) (spacemacs//helm-open-buffers-in-windows buffers))
  (lambda (candidate) (let* ((files (helm-marked-candidates)) (buffers (mapcar 'find-file-noselect files))) (spacemacs//helm-open-buffers-in-windows buffers)))("/home/drewverlee/Personal/aoc2020/src/binary_board...")
  helm-execute-selection-action-1()
  helm-execute-selection-action()
  helm-internal(helm-source-find-files "/home/drewverlee/Personal/aoc2020/src/" "Find files or url: " nil nil "*helm find files*" nil nil nil)
  apply(helm-internal (helm-source-find-files "/home/drewverlee/Personal/aoc2020/src/" "Find files or url: " nil nil "*helm find files*" nil nil nil))
  helm(helm-source-find-files "/home/drewverlee/Personal/aoc2020/src/" "Find files or url: " nil nil "*helm find files*" nil nil nil)
  apply(helm (helm-source-find-files "/home/drewverlee/Personal/aoc2020/src/" "Find files or url: " nil nil "*helm find files*" nil nil nil))
  helm(:sources helm-source-find-files :input "/home/drewverlee/Personal/aoc2020/src/" :case-fold-search smart :preselect nil :ff-transformer-show-only-basename t :default nil :prompt "Find files or url: " :buffer "*helm find files*")
  helm-find-files-1("/home/drewverlee/Personal/aoc2020/src/")
  (let* ((hist (and arg helm-ff-history (helm-find-files-history nil))) (default-input hist) (input (cond ((and (eq major-mode 'dired-mode) default-input) (file-name-directory default-input)) ((and (not (string= default-input "")) default-input)) (t (expand-file-name (helm-current-directory)))))) (set-text-properties 0 (length input) nil input) (helm-find-files-1 input))
  spacemacs/helm-find-files(nil)
  funcall-interactively(spacemacs/helm-find-files nil)
  call-interactively(spacemacs/helm-find-files)
  lazy-helm/spacemacs/helm-find-files()
  funcall-interactively(lazy-helm/spacemacs/helm-find-files)
  call-interactively(lazy-helm/spacemacs/helm-find-files nil nil)
  command-execute(lazy-helm/spacemacs/helm-find-files)

Drew Verlee04:01:43

commenting out the require for cider-compat seems to remove the error. no idea if thats the right idea. i can't tell what thats doing https://github.com/clojure-emacs/helm-cider/blob/master/helm-cider-spec.el

practicalli-johnny10:01:03

Seems the cider-compat.el library was to support earlier versions of Emacs (before 26), so assuming your using Emacs 26 or newer, then comment/ removing that line from helm-cider code seems fine (I am not expert though) https://github.com/clojure-emacs/cider/issues/1882

practicalli-johnny10:01:12

It seems cider-compat contains two macros, if-let* and when-let* which are defined if they do not already exist. helm-cider-spec.el doesnt call either of these as functions, so it seems the cider-compat namespace require is not needed anyway. The cider-compat does require subr-x, and helm-cider-spec.el does use functions from that namespace, however, helm-cider-spec.el also requires subr-x namespae.

practicalli-johnny12:01:05

I've https://github.com/clojure-emacs/helm-cider/issues/12 to request removing the require of cider-compat as its simply not needed

practicalli-johnny13:01:09

I've also raised a PR

practicalli-johnny17:01:50

Updated helm-cider package now available via Melpa now (and therefore available in Spacemacs package updates too)

practicalli-johnny14:01:18

FYI helm-cider errors when opening Clojure files when using latest snapshot of CIDER. Some options for work-arounds here: https://practical.li/blog/posts/emacs-cider-removing-old-cider-compat/ I've raised a PR with helm-cider

👏 1