This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (3)
- # announcements (1)
- # babashka (25)
- # beginners (55)
- # calva (12)
- # cider (40)
- # clj-kondo (13)
- # clojure-australia (2)
- # clojure-dev (11)
- # clojure-europe (67)
- # clojure-france (6)
- # clojure-nl (16)
- # clojure-uk (9)
- # clojuredesign-podcast (9)
- # clojurescript (17)
- # conjure (7)
- # cursive (3)
- # datomic (3)
- # emacs (8)
- # figwheel-main (7)
- # fulcro (21)
- # google-cloud (21)
- # graphql (8)
- # helix (1)
- # honeysql (32)
- # instaparse (2)
- # jobs (2)
- # jobs-discuss (2)
- # meander (80)
- # mount (1)
- # off-topic (25)
- # pathom (31)
- # polylith (1)
- # rdf (24)
- # re-frame (21)
- # reagent (29)
- # releases (1)
- # remote-jobs (1)
- # shadow-cljs (16)
- # slack-help (6)
- # sql (5)
- # tools-deps (23)
- # uncomplicate (2)
- # wasm (2)
- # xtdb (4)
Has anyone seen an error like this before in the nrepl middleware? Not entirely sure what causes it - but I think it happens when there’s an exception and cider tries to print it
yeah ok that seems to have fixed it…
JAVA_HOME was pointing to the system java rather than the one I was using… slight
hmm odd I’ve just seen the exception again… looks like this hasn’t fixed it after all :thinking_face:
hey guys, has any of you experienced a weird behaviour while using
cider seems to be resolving to the wrong project type ?
I have a
deps.edn-based project and it is supposed to handle refactoring commands pertaining to that particular type of project. Though when launching an
add-project-dependency for e.g it tells me that it tried to lookup for a
:dependencies key which means that somehow it considers the project as a leiningen-based one.
Debugger entered--Lisp error: (search-failed ":dependencies") re-search-forward(":dependencies") cljr--insert-into-leiningen-dependencies("mount" "0.1.16") cljr--add-project-dependency("mount" "0.1.16") cljr-add-project-dependency(nil) funcall-interactively(cljr-add-project-dependency nil) #<subr call-interactively>(cljr-add-project-dependency nil nil) apply(#<subr call-interactively> cljr-add-project-dependency (nil nil)) (let ((ido-cr+-current-command command)) (apply orig-fun command args)) [email protected]+-record-current-command(#<subr call-interactively> cljr-add-project-dependency nil nil) apply([email protected]+-record-current-command #<subr call-interactively> (cljr-add-project-dependency nil nil)) call-interactively(cljr-add-project-dependency nil nil) command-execute(cljr-add-project-dependency)
nevermind, I debugged it using
edebug and figured out that it was because I had a
pom.xml inside the project (which was generated by
(defun cljr--add-project-dependency (artifact version) (let* ((project-file (cljr--project-file)) (deps (cljr--project-with-deps-p project-file))) (cljr--update-file project-file (goto-char (point-min)) (if deps ;; SO WHEN deps IS nil (cljr--insert-into-clj-dependencies artifact version) (cljr--insert-into-leiningen-dependencies artifact version)) ;; clj-refactor CONSIDERS THE PROJECT AS A lein-based ONE (cljr--post-command-message "Added %s version %s as a project dependency" artifact version) (when cljr-hotload-dependencies (if deps (back-to-indentation) (paredit-backward-down)) (cljr-hotload-dependency)))))
@rickmoynihan If this started happening recently, it might be related to the fixes we've tried for https://github.com/clojure-emacs/orchard/issues/103
I'm assuming that something might be missing in your JDK 8 installation. Probably you won't get the error with JDK 11.
The Java integration is one of the most frustrating things in CIDER, as things there constantly break...
Ok, interesting… I could possibly use jdk11, though it’ll mean I need to use two jdks for different services
Hello. I am missing a CIDER command:
cider-toggle-ignore-next-form. It should either place or remove
#_ at current cursor position.
What is the honorable thing to do? Just put it in my custom config? Pull-Request to the Spacemacs configuration layer? Pull-Request to CIDER?
@witek It should like something that should be in
clojure-mode, as it doesn't require a REPL to work.
I'm just wondering that's the value of adding a command that adds or delete two characters at point. Probably that'd be more useful if it was applied to the preceding or containing form.
Any tips for troubleshooting a slow
;; Connected to nREPL server - comment appears immediately, but it takes about 45 seconds for the
user> to appear. I’m using
cider-nrepl 0.25.9 and the CIDER snapshot
on Emacs 27.1. I start the server with
first guess, its the state tracker populating the emacs side with all the known namespaces and vars
@dpsutton that makes sense--this is a large project. Is there any way to pre-calculate this (something we could do in our build)?
my suspicion is its not the calculation of it but just sending to emacs, parsing, and storing in memory. so no good solution off hand that i can think of (if this is even the problem anyways)
Yeah, you can't. It should probably be configurable, but it's not as even basic things like the connection type are handled by it.
yeah. i imagine the connection type always stays in there. just not the huge map of dictionaries of nses
I tried enabling debug on quit and hitting C-g during the wait, as the troubleshooting guide that @bozhidar linked to suggests, but I don’t get any backtrace or any other information. so I’m not sure how to confirm your hypothesis. for a given REPL process, if I disconnect and then reconnect, the second connection is instantaneous.
start profiling, cider connect, wait until it unfreezes and run
profiler-report. note do not run
profiler-stop. you'd think you start, stop, see results. but you can only see results of actively running profilers.
- command-execute 9,655,949 73% - call-interactively 9,655,949 73% - funcall-interactively 9,655,949 73% - counsel-M-x 9,655,949 73% - ivy-read 9,355,822 70% - ivy-call 7,208,547 54% - counsel-M-x-action 7,208,547 54% - command-execute 7,208,547 54% - call-interactively 7,208,547 54% - funcall-interactively 7,208,515 54% - cider-connect 3,652,581 27% - cider--update-host-port 2,435,135 18% - cider-select-endpoint 2,435,135 18% - cider--ssh-hosts 1,562,797 11% + eval 1,542,325 11% + seq-map 17,400 0% + version< 3,072 0% + cider--completing-read-port 373,606 2% + cider--completing-read-host 237,411 1% + cider--infer-ports 235,481 1% + seq-uniq 24,816 0% split-string 1,024 0% - cider-nrepl-connect 1,208,190 9% - nrepl-start-client-process 1,208,190 9% + run-hooks 651,591 4% + #<compiled 0x1feb8b26da11> 477,204 3% + nrepl--init-capabilities 45,358 0% + nrepl--init-client-sessions 18,584 0% + nrepl-connect 7,181 0% + cider--update-project-dir 5,120 0% - cider--check-existing-session 4,136 0% + sesman-current-sessions 4,136 0% + profiler-report 3,555,279 26% profiler-start 655 0% + read-from-minibuffer 1,657,843 12% + ivy--reset-state 356,434 2% + ivy--update-prompt 3,104 0% + #<compiled 0x1feb870c8e1d> 1,056 0% + counsel--M-x-externs 300,127 2% + timer-event-handler 1,626,289 12% + nrepl-client-filter 833,280 6% + redisplay_internal (C function) 786,459 5% + ucs-normalize-hfs-nfd-pre-write-conversion 115,835 0% + linum-update-current 75,598 0% + ... 45,360 0% + ucs-normalize-hfs-nfd-post-read-conversion 41,344 0% + eldoc-schedule-timer 584 0%
I ran the report after (but it was profiling the whole time). I will try running the report during.