Getting a weird error when running cider-jack-in-clj
with a Clojure CLI deps.edn
project and using an alias with the -M
flag rather than the deprecated -A
flag (I've tried a few aliases with the same error). I have tried this with several versions of Clojure CLI tools installed, from 1.10.1.697 onwards.
Using the -A
flag does not give this error...
error in process sentinel: Could not start nREPL server: Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-Sdeps (No such file or directory)
CIDER 1.0.0snapshot (package: <tel:202009301242|20200930.1242>)
Update: In the #tools-deps channel I am asking if the -M
flag has issues when the -Sdeps
option is also supplied (as I cant seem to turn -Sdeps
injection for cider-jack-in-clj
off completely with variables in .dir-locals.el)@jr0cket @theophilusx I suggested a potential fix in the Github issue.
I am seeing the same error as @jr0cket, but using cider 20201020..1058 package
hey. how can I use cider to debug my code, I watch the doc, but found nothing I understand.
can you tell me how to operate??
@steiner3044 debugging basics with Cider https://practicalli.github.io/spacemacs/debug-clojure/cider-debug.html
sorry, I don't use spacemacs, but original one
only difference is C-M-x
instead of , d b
to start
eh, which one should I use??
eh, what operation should I do first??
C-u C-M-x
with the cursor on a function will instrument that function. This adds breakpoints to that function.
Then evaluate a call to that function using the usual key bindings or command
A menu should appear above the instrumented function.
Use n
(next) to step through the evaluation of each expression or form in the function, using any arguments passed to that function.
another question, how to set proxy in cider, cider-jack-in
failed because former proxy port is forbidden by me, and now I use a new port for proxy
I have to say, C-M-x
in may key-bind is cider-eval
eh, I am trying to debug in cider now, and I copy this code from doc:
(loop [i 0]
#break
(when (< i 10)
(println i)
(recur (inc i))))
but it throws me an error that
1. Caused by java.lang.RuntimeException
Unmatched delimiter: )
what's happening??ps: I am sure `
{:user {:plugins [[cider/cider-nrepl "0.9.0"]]}}
has been writen in my .lein/profile.clj
that version was released in 2015.
!!!
what should I do
i can't believe it even works. remove that from lein profiles. if you use cider-jack-in
CIDER now makes sure the correct dependencies are added
you mean write [cider/cider-nrepl "0.9.0"]
in to my project.clj??
no. don't add anything. if you use cider-jack-in
it will add it automatically. also, that version is from 2015 so you certainly shouldn't use that version in any case
but however, cider-toggle-trace-var
only works when [cider/cier-nrepl] writen in .lein/profile.clj
CIDER needs cider-nrepl
on the classpath. if you remove that from your lein profiles, but you use cider-jack-in
CIDER will add the correct version for you on startup
/Users/dan/bin/lein update-in :dependencies conj \[nrepl\ \"0.8.2\"\] -- update-in :plugins conj \[cider/cider-nrepl\ \"0.25.3\"\] -- repl :headless :host localhost
is an example of the way that CIDER starts up a lein project. as you can see, it includes the correct recent version of cider-nrepl for all features of CIDER to work correctly
if you are starting your project in another manner then you are responsible for ensuring the dependencies are on the classpath. I'd recommend a profile and then lein with-profile +name-of-the-profile
that includes the dep [cider/cider-nrepl "0.25.3"]
or the most recent version of cider-nrepl
user-error: 'cider-toggle-trace-var' requires the nREPL op "toggle-trace-var" (provided by cider-nrepl)
I remove content of .lein/profile.clj
how did you start your repl?
cider-jack-in
at the top of the repl buffer do you see something like: ;; Startup:
with a big command after it? can you post that?
and what is the output of lein --version
?
2.8.1 maybe it's too low
yeah. lein upgrade 2.9.4
should update it
hold on please, I install it from apt, now I want to build it from source, just for fun, can I do it??
i guess? uninstall from apt and then do what you want
C-u C-M-x it seems. I dont use the cider keybindings, but the keybinding is described in the docs
wow, I solve that after upgrade leiningen, thank you
and in general, never put stuff in lein/profiles. Use a profile in the project or let CIDER manage it for you
one more question ![image](https://docs.cider.mx/cider/_images/cider_debugger.gif) how can I do like this?? I copy it in my emacs, but find it not stop
and this is Startup message
;; Connected to nREPL server - <nrepl://localhost:39981>
;; CIDER 1.0.0-snapshot, nREPL 0.8.2
;; Clojure 1.8.0, Java 11.0.8
;; 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;
;; ======================================================================
;; If you're new to CIDER it is highly recommended to go through its
;; user manual first. Type <M-x cider-view-manual> to view it.
;; In case you're seeing any warnings you should consult the manual's
;; "Troubleshooting" section.