This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-29
Channels
- # adventofcode (1)
- # announcements (2)
- # beginners (163)
- # biff (3)
- # calva (19)
- # cider (56)
- # cljs-dev (5)
- # clojure (43)
- # clojure-belgium (2)
- # clojure-europe (47)
- # clojure-norway (32)
- # clojure-uk (2)
- # clojurescript (24)
- # datomic (5)
- # events (1)
- # fulcro (2)
- # hoplon (11)
- # hyperfiddle (12)
- # jobs (1)
- # lsp (15)
- # malli (7)
- # music (1)
- # polylith (2)
- # re-frame (7)
- # reagent (7)
- # shadow-cljs (25)
- # specter (9)
- # squint (16)
- # xtdb (5)
What is the correct way to jump to definition in cider?
My M-.
is bound to xref-find-definition
cider by default integrates with xref, which is idiomatic but also occasionally complex, if there are other 'backends'.
defcustom cider-use-xref t
controls M-. behavior. Set it to nil, restart emacs, and the xref machinery will be skipped
Now I'm curious: what are the advantages or disadvantage of xref and the other backend?
does that mean you also are running an older cider? cider<->xref integration had some bugs, fixed this summer
Debugger entered--Lisp error: (wrong-number-of-arguments #f(compiled-function (symbol standard doc &rest args) #<bytecode 0x40099fb3>) 2)
#f(compiled-function (symbol standard doc &rest args) #<bytecode 0x40099fb3>)(cider-use-xref t)
macroexpand((defcustom cider-use-xref t) nil)
macroexp-macroexpand((defcustom cider-use-xref t) nil)
macroexp--expand-all((defcustom cider-use-xref t))
macroexpand-all((defcustom cider-use-xref t))
eval-expression((defcustom cider-use-xref t) nil nil 127)
funcall-interactively(eval-expression (defcustom cider-use-xref t) nil nil 127)
#<subr call-interactively>(eval-expression nil nil)
apply(#<subr call-interactively> eval-expression (nil nil))
call-interactively@ido-cr+-record-current-command(#<subr call-interactively> eval-expression nil nil)
apply(call-interactively@ido-cr+-record-current-command #<subr call-interactively> (eval-expression nil nil))
call-interactively(eval-expression nil nil)
command-execute(eval-expression)
> Now I'm curious: what are the advantages or disadvantage of xref and the other backend? 'backends' is xref terminology. For M-. there can be cider, lsp , ctags backends competing for priority When things go wrong, it can be a bit opaque to debug
@U010VP3UY9X what had you tried?
M-: (defcustom cider-use-xref t)
I'm trying to update my packages and I see an error.
Compiling file /Users/jimka/.emacs.d/elpa/cider-1.12.0/cider-util.el at Wed Nov 29 15:20:49 2023
In cider-get-ns-name:
cider-util.el:123:4:Warning: clojure-find-ns called with 1 argument, but
accepts only 0
Compiling file /Users/jimka/.emacs.d/elpa/cider-1.12.0/cider-xref-backend.el at Wed Nov 29 15:20:49 2023
is that a known issue?
(setq cider-use-xref nil)
disables xref, try that
and you should upgrade clojure-mode, (and parseedn) along cider
sorry, is this upgrading an emacs melpa package, or is this updating from unix with brew upgrade?
looks like clojure-mode is ok.
cider is marked as obsolete, is that normal?
I'll check what that obsolence means. likely a false alarm / we have changed nothing, received zero reports
Not sure what this incompatible package is
after upgrade, problem restarting emacs and cider-jack-in
emacs tells me nothing needs upgrading. I guess I need to force an upgrade?
nothing in project.clj that I can see.
is there something in my home directory?
I have ~/.clojure/deps.edn but everything is commented out
{:user {:jvm-opts ["-Djdk.attach.allowAttachSelf"]
:plugins [[lein-license "0.1.8"]
[cider/cider-nrepl "0.30.0"]
[lein-cloverage "1.1.2"]
[jonase/eastwood "0.3.10"]
[lein-ns-dep-graph "0.2.0-SNAPSHOT"]
]
:dependencies [[com.clojure-goes-fast/clj-async-profiler "0.4.1"]
[org.clojure/clojure "1.11.1"]
[org.clojure/tools.trace "0.7.10"]]
}}
that's ~/.lein/projects.clj
not sure what eastwood is. upgrade to what?
cider-jack-in does not stacktrace, but still gives an emacs error.
same error even after upgrading eastwood
(eastwood has nothing to do was simply an observation in case you are interested in using it)
sorry I don't know how to tell emacs to update a package which it thinks is up to date.
when I press shift-U it says nothing needs to be upgraded
should I delete it and reinstall?
looks like i'm using emacs 26, I thought I upgraded to emacs 29... doing it now
upgraded to emacs 29
removed and reinstalled emacs packages cider clj-refactor clojure-mode clj-something-else
Now M-.
seems to work. yipeee. thanks for the help.
I need a scotch
6mo might be an exageration. an old friend of mine once advised me to restart emacs at least twice a year.
Oops. another error
stacktrace is not very helpful unfortunately
and now M-.
no longer works
yes, some code somewhere depends on cider-mode, but does not require it.