This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-04-06
Channels
- # announcements (33)
- # babashka (13)
- # babashka-sci-dev (23)
- # beginners (94)
- # calva (105)
- # cider (37)
- # circleci (1)
- # clj-kondo (45)
- # cljs-dev (59)
- # cljsrn (2)
- # clojure (145)
- # clojure-czech (1)
- # clojure-europe (19)
- # clojure-nl (18)
- # clojure-norway (13)
- # clojure-portugal (1)
- # clojure-uk (5)
- # clojurescript (19)
- # community-development (2)
- # conjure (3)
- # copenhagen-clojurians (1)
- # core-async (34)
- # data-science (6)
- # datomic (25)
- # emacs (43)
- # fulcro (19)
- # graalvm (7)
- # graalvm-mobile (12)
- # graphql (10)
- # honeysql (3)
- # hyperfiddle (3)
- # improve-getting-started (2)
- # interop (20)
- # kaocha (3)
- # lsp (16)
- # meander (7)
- # off-topic (22)
- # other-languages (14)
- # portal (15)
- # releases (1)
- # rewrite-clj (2)
- # ring (1)
- # shadow-cljs (119)
- # spacemacs (19)
- # sql (65)
- # testing (4)
- # tools-deps (11)
- # xtdb (29)
what kind of object is:
(cider-nrepl-sync-request:eval "123")
in elisp?
If I do
(defun simple ()
(interactive)
(message (pp (type (cider-nrepl-sync-request:eval "123")))))
I get:
(dict "status"
("done")
"id" "3009" "ns" "couperin.core" "session" "541d57ee-8fe0-4bd5-8b98-8e4dc145edc9" "value" "123")
that seems a dictionary, is it only a list instead? How would I retrieve the "value"?what would have been the way of knowing that that was an nrepl-dictionary
? Is there a type
function of some sort?
look for uses of defmacro nrepl-dbind-response
which is the normal way to “destructure” from it
(defun nrepl-dict (&rest key-vals)
"Create nREPL dict from KEY-VALS."
(cons 'dict key-vals))
My minimal cider install hands Emacs displaying 'Can't find instrumented sexp, did you edit the source?' if I ever use here
/ h
when debugging. I've replicated this on several work projects and just in a toy application. What am I doing wrong? Other debugging works fine. My entire Cider config is
(use-package cider
:ensure t
:config
(setq clojure-toplevel-inside-comment-form t)
(setq cider-save-file-on-load t)
(setq cider-repl-pop-to-buffer-on-connect nil))
I'm on Cider <tel:202204051216|20220405.1216>, Clojure CLI version 1.11.0.1100, and Java openjdk version "17.0.2" 2022-01-18.
However, as this happens on two machines, it doesn't seem config nor version dependent...Where do I tweak JVM settings for CIDER?
I’m suddenly getting OOM errors
kinda depends. CIDER is gonna just launch your program with lein or the clojure cli. So you could put the settings there or behind an alias and just make sure to use that alias
Sorry, I should have clarified. I’m connecting to a process running via clj on the command line. But I believe CIDER spins up a separate JVM, correct?
Hmm, ok. No one else is having this issue but me, so as the sole user of CIDER, I’m assuming that’s my problem.
cider-jack-in
will make sure to start the process with an nrepl server running with cider’s middleware
if the stacktraces have something actionable, raise an issue if that part of CIDER can use less memory
ok… I’ll throw memory at it as a last resort if I can’t narrow it down. But yes, I’ll try that first.
we had an OOM stacktrace recently that showed it was using too much memory in the stacktrace annotation bit. If you can recognize something like that it would be helpful
see the stacktrace here. And if it’s easy to scroll up to it you can see our proposed solutions.
Oh, I see. Someone else had the same issue recently. Ok, I’ll just bump up those numbers. I just hate to do it for the entire project and team when I’m the only one that needs it.
It’s only the dev alias, so…
also, try to redefine the function that OOM’d with my proposed fix and see if it solves it
Hmm, I could do that as well.
Sorry, I’m just being lazy, lol. I hate getting sidetracked while trying to solve a big issue
ok, time to read about tools/deps aliases.
Looks like I just need that simple file in my home directory.
yeah. add :memory {:jvm-options ["-Xmx8g"]}
to .clojure/deps.edn
and then use the :memory
alias when starting your process
Oh, this is sweet… clojure -M:dev:memory
Let’s see if it does the trick…. anyway, I’m on the right track. Thanks for your help, @dpsutton!