Closed BuddhiLW closed 1 year ago
I have no experience with Emacs/Cider, so I don't know what the issue is here. The stack trace is not very helpful either. One thing that comes to mind is if you included the correct aliases when starting your REPL. :dev
and :test
aliases should be included while starting the REPL for the project to work. Have you figured out any solutions yet?
I haven't. I was reading about polylith
, and wanted to inspect the project, locally. Upon being stuck, I just documented the error, here, and moved on.
The stack trace is not very helpful either.
I agree.
One thing that comes to mind is if you included the correct aliases when starting your REPL. :dev and :test aliases should be included while starting the REPL for the project to work.
I don't have this option, upon cider start and until I get the error
It could be a good idea to ask this question in Clojurians Slack. There may be some people using Emac/Cider together with Polylith.
(CIDER maintainer here)
I was able to run this project in CIDER without a problem.
Does the /bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
command pass on a vanilla shell?
I don't have this option, upon cider start and until I get the error
Yes, you do, it's the cider-clojure-cli-aliases
option. See https://docs.cider.mx/cider/basics/up_and_running.html or simply query the cider-clojure-cli-aliases
docs within Emacs
cider/cider-nrepl {:mvn/version "0.30.0"}
indicates you're a touch behind. I'd recommend using CIDER at Git master
or its latest snapshot (20231008.2124
as of today).
If it persists after trying all those, feel free to create a detailed issue in CIDER.
Cheers - V
I suspect your clojure
command is either very old or is not the official CLI.
What does clojure -version
display?
You are right.
I recently reformatted my PC and just fresh-installed Clojure and Cider.
The project runs as it should.
Thanks people!
Just to make an addendum, I use doom emacs, and all my packages are installed through doom extensions. And, I regularly update it.
The current repl spawn message is the following:
nREPL server started on port 42277 on host localhost - nrepl://localhost:42277
;; Connected to nREPL server - nrepl://localhost:42277
;; CIDER 1.7.0-snapshot (package: 1.7.0-snapshot), nREPL 1.0.0
;; Clojure 1.11.1, Java 17.0.9-ea
;; Docs: (doc function-name)
;; (find-doc part-of-name)
;; Source: (source function-name)
;; Javadoc: (javadoc java-object-or-class)
;; Exit: <C-c C-q>
;; Results: Stored in vars *1, *2, *3, an exception in *e;
;; Startup: /usr/local/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.30.0"} refactor-nrepl/refactor-nrepl {:mvn/version "3.6.0"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl
user>
That's the standard CIDER repl init message. Probably can be customized away.
That CIDER is quite behind, but they're on it
I can enforce a package to be fetched from github, for example. I will do that with Cider
, for now. Thanks for the heads up.
A question, I'm trying to use .dir-locales.el
in order to modify cider-clojure-cli-aliases
. But, I'm not sure how I would do it.
;; cider-clojure-cli-aliases
((cider-clojure-cli-aliases . ":dev"))
As, the emacs doc:
cider-clojure-cli-aliases is a variable defined in ‘cider.el’.
Its value is nil
A list of aliases to include when using the clojure cli.
Alias names should be of the form ":foo:bar".
Leading "-A" "-M" "-T" or "-X" are stripped from aliases
then concatenated into the "-M[your-aliases]:cider/nrepl" form.
This variable is safe as a file local variable if its value
satisfies the predicate ‘stringp’.
This variable was introduced, or its default value was changed, in
version 1.1 of the cider package.
You can customize this variable.
Currently, I'm unable to inject the :dev
alias
It's named .dir-locals.el
(probably you didn't make that typo, but just in case)
If it's not getting picked up that's a generic Emacs problem. I'd try luck over Clojurians #emacs or #doom-emacs
Thanks for the correction. I committed the typo only here, indeed.
Well, I went raw for the M-x customize
... which is not ideal. But, I was able to run everything.
That's more than enough for now! :)
I'm using
cider
,M-x cider-jack-in-clj
,And the full report says: