This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-11-06
Channels
- # announcements (5)
- # asami (4)
- # babashka (27)
- # beginners (1)
- # calva (4)
- # cider (64)
- # clj-kondo (7)
- # clojure (7)
- # clojure-brasil (3)
- # clojure-europe (41)
- # clojure-france (2)
- # clojure-norway (101)
- # clojure-uk (5)
- # clojurescript (19)
- # cursive (3)
- # datahike (15)
- # datomic (15)
- # events (2)
- # honeysql (11)
- # hyperfiddle (27)
- # introduce-yourself (2)
- # jobs-rus (1)
- # leiningen (8)
- # london-clojurians (1)
- # lsp (175)
- # off-topic (52)
- # overtone (10)
- # portal (15)
- # re-frame (7)
- # reagent (1)
- # releases (1)
- # remote-jobs (2)
- # shadow-cljs (15)
- # sql (5)
@vemv What do you think about enabling cljr-slash-uses-suggest-libspec
for clj-refactor by default now? I know https://github.com/clojure-emacs/clj-refactor.el/issues/530 hasn't been fixed, but the primary use case of detecting the project :as aliases and suggesting them works much better with suggest-libspec, so it would be nice to transition folks over to that method. I know there was some discussion about moving cljr-slash into cider, but it still seems like we can move forward in cljr before transitioning it to cider.
Awesome, glad to hear it. Let me know if we have more steps there.
I'm running into an issue where when I try to hit tab tab for completions, my CPU spikes for a while until I get a OOM exception (See attached stacktrace). I'd be happy to follow up with a github issue or more info. More info in 🧵 .
I'm running emacs via ssh on a pretty dinky server 1G RAM and 1VCPU.
It's possible that I also have some large jars on the classpath from including binaries resources.
versions:
;; CIDER 1.10.0 (Sant Cugat), nREPL 1.0.0
;; Clojure 1.11.1, Java 18.0.2-ea
Ubuntu linux
I've had this issue for a while, but I thought it was because I was running old versions. However, I just ran into issue again with the same project on a fresh setup.
Yikes, certainly shouldn't happen. Are all of that dependencies public, or is there some private stuff?
Most of it's public
If you just paste the public part of the dependencies, I'll take a look what's going on
everything there should be public except com.phronemophobic.discord {:local/root "../discord"}
Actually, let me try and reproduce without that dep.
Truth be told, a large category of Clojure programs are subject to fail with just 1GB RAM knowing Alex, I'd bet that this will be fixed, but in general limited official support can be expected from CIDER under constrained resources
Everything else works fine. I also added 4G of swap which isn't great for performance, but it doesn't need to do anything quickly.
...A good example being clj-kondo, if you want to analyze the whole classpath it can take 4GB with no possible workaround. I'm fine with that.
Oooh, I overlooked the 1Gb part. Still, this should certainly be enough for Compliment, I bet there is a bug somewhere and this is not a natural limit
Yea, completely turning it off is an acceptable workaround for me.
It's just my muscle memory hoses the server 😛.
there's an example in the error log, but it's usually when I'm in slackcommands.util
and trying to call save-large-png
so something like save-l
Hm, could not reproduce right away with my default heap sizing, let me try downsize it
Hm, works fine on my machine with Xmx1g. Could you check if it still reproduces if you e.g. clear the target
directory? I see it isnt' listed in paths
so it shouldn't matter but who knows 🤷
the target
directory?
I don't think there is one.
There is indeed a good amount of classes on the classpath (100k+) but it goes through without a hitch on my laptop
Could you please try this instead of hitting Tab?
(require '[cider.nrepl.inlined.deps.compliment.v0v4v4.compliment.utils :as cutils])
(count (cutils/namespaces&files-on-classpath))
ok, now it's working
let me double check it
oh, ok. just calling that code doesn't fix it. I think I just realized the problem.
When I want a completion, I mash a combination of tab and ESC+TAB several times. 😆
Which I think overloads it.
oh weird. at some point it caches the response and it works fine again?
Still weird that you run into this because it flies almost instantly. But that's on a decent machine
In a setup like yours, I can imagine it being slower so that you can squeeze in multiple invocations of that stuff
I was able to reproduce the OOM with the following steps:
• open slackcommands.util
• cider-jack-in
• C-c M-n M-n
(cider-repl-set-ns NS)
• C-c C-k
cider-load-buffer
• switch to cider terminal
• type save-
• tap ESC+TAB
3 times, then immediately TAB
3 times
mashing the different forms of tab is just muscle memory :man-facepalming:
Would you try this for me? 🙂
(require '[cider.nrepl.inlined.deps.compliment.v0v4v4.compliment.utils :as cutils])
(dotimes [_ 100]
(.start (Thread. #(println (count (cutils/classes-on-classpath))))))
I didn't include it in the error log, but I also end up with several messages in the cider log:
ERROR: Unhandled REPL handler exception processing message {:op complete, :ns slackcommands.util, :prefix save-la, :context :same, :enhanced-cljs-completion? t, :session 3f3f37d6-2df9-4b11-868b-98810d8eda29, :id 85}
Ok, running the above snippet. The CPU is pegged and OOM exceptions are being printed sporadically.
Thank you!
Thanks for the quick response! Glad my impatient mashing is good for something.
Just curious if this issue was ever addressed. It's not critical, but it would be helpful.
From memory, @U06PNK4HG fixed this and it made it into cider-nrepl latest as bundled with cider.el latest stable
cool. I'll try it out!