This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-03-31
Channels
- # arachne (4)
- # beginners (21)
- # boot (36)
- # cider (59)
- # cljsrn (8)
- # clojure (260)
- # clojure-filipino (3)
- # clojure-greece (3)
- # clojure-italy (15)
- # clojure-russia (58)
- # clojure-spec (54)
- # clojure-uk (99)
- # clojureremote (5)
- # clojurescript (65)
- # core-matrix (1)
- # cursive (17)
- # data-science (9)
- # datascript (7)
- # datomic (33)
- # emacs (8)
- # hoplon (2)
- # jobs (1)
- # jobs-discuss (2)
- # lein-figwheel (2)
- # lumo (2)
- # numerical-computing (1)
- # off-topic (22)
- # om (78)
- # onyx (17)
- # parinfer (3)
- # pedestal (5)
- # perun (1)
- # powderkeg (19)
- # protorepl (37)
- # re-frame (3)
- # rum (2)
- # spacemacs (1)
- # uncomplicate (8)
- # unrepl (78)
- # untangled (29)
- # yada (41)
is there a way to navigate to java source code for classes in clojure.lang, e.g. clojure.lang.PersistentVector? I tried cider-find-var
but it gives me "no source location"
Note: I'm using spacemacs and I've already installed eclim as mentioned here: https://github.com/syl20bnr/spacemacs/tree/master/layers/%2Blang/java#eclim
the thing is that it works for Java classes like java.util.List
but not for "Clojure java classes" like clojure.lang.PersistentVector
was there a tremendous increase in the memory footprint of cider-nrepl between 0.10 and 0.15?
I used to be able to cider-jack-in my project with 128M max heap. Not anymore.
@cpmcdaniel this is on the same project that has no changes? ie project under 0.10 is fine and under 0.15 can't start up with no changes?
yeah, other folks on my project are running an older version of cider without OOMs
er, at least one other… folk
basically, the repl starts up, but once I eval a buffer or expression, it crashes and heap dumps
i'm not sure. if you can hook up a profiler an issue with that info would be very helpful
I looked at the heapdump with some tools
nothing suspicious looking from our own namespaces, but lots (tons) of Var instances from threads with nrepl-refactor in the stack
that was about the only thing I could glean from it
You could probably remove nrepl-refactor?
@pesterhazy was that directed at me?
cider now adds the deps inline, correct?
with jack-in, anyway
(using the clojure layer in spacemacs, fyi)
ah. What I do is to start the repl in a terminal and then use cider-connect
gives me more of a feeling of control
yeah, but then don’t you have to put the cider-nrepl plugin version in your lein profile?
otherwise you don’t get the full functionality of cider
right it's there, but not the refactor one
btw, perhaps someday soon unrepl may offer a lighter weight repl connection
so cider-jack-in avoids the profile setup by injecting deps right on the lein cli
which I really like
right, that's neat
makes it easy to keep the versions in sync when I update cider
unrepl will do that too
"inject" all it needs into the jvm process
(defun cljr--inject-jack-in-dependencies ()
"Inject the REPL dependencies of clj-refactor at `cider-jack-in'.
If injecting the dependencies is not preferred set `cljr-inject-dependencies-at-jack-in' to nil."
(when (and cljr-inject-dependencies-at-jack-in
(boundp 'cider-jack-in-lein-plugins)
(boundp 'cider-jack-in-nrepl-middlewares))
(add-to-list 'cider-jack-in-lein-plugins `("refactor-nrepl" ,(cljr--version t)))
(add-to-list 'cider-jack-in-nrepl-middlewares "refactor-nrepl.middleware/wrap-refactor")))
ie, i think if you just uninstall clj refactor it will prohibit clj refactor from injecting itself
well, this is how it actually launches lein...
;;;###autoload
(defun cljr--inject-jack-in-dependencies ()
"Inject the REPL dependencies of clj-refactor at `cider-jack-in'.
If injecting the dependencies is not preferred set `cljr-inject-dependencies-at-jack-in' to nil."
(when (and cljr-inject-dependencies-at-jack-in
(boundp 'cider-jack-in-lein-plugins)
(boundp 'cider-jack-in-nrepl-middlewares))
(add-to-list 'cider-jack-in-lein-plugins `("refactor-nrepl" ,(cljr--version t)))
(add-to-list 'cider-jack-in-nrepl-middlewares "refactor-nrepl.middleware/wrap-refactor")))
;;;###autoload
(eval-after-load 'cider
'(cljr--inject-jack-in-dependencies))
this is from clj-refactor. This looks like if you uninstall it it won't inject itself
or, use a dir-locals file to set cljr-inject-dependencies-at-jack-in
to nil to prevent this from executing the (add-to-list lein-plugins refactor-nrepl...
and c-h v [ret] cider-jack-in-lein-plugins
will show you the current value, which appears to be set by clj refactor
cider-jack-in-lein-plugins is a variable defined in ‘cider.el’.
Its value is (("refactor-nrepl" "2.3.0-SNAPSHOT")
("cider/cider-nrepl" "0.15.0-SNAPSHOT"))
This variable may be risky if used as a file-local variable.
Documentation:
List of Leiningen plugins where elements are lists of artifact name and version.
hmm. ha. "This variable may be risky if used as a file-local variable" that's not good 🙂anyone have general thoughts on nrepl-refactor? I can’t even say for sure if I’m using any of it’s features...
i never think to use it, but i'm not full time in clojure. I'll bet that if i was i would use it. That being said, if it's causing problems and you don't use it, toss it
but you can put a dev profile in there to raise your jvm heap which won't affect production
well, I bumped my heap to 256M, which is still reasonably small, and all is well
also, confirmed another co-worker of mine ran into the same problem
we were probably near the 128M ceiling before nrepl-refactor was a thing
or at least in the ~100M ballpark
looks like nrepl-refactor does some useful things
I will keep it for now and try some of its features
like cleaning up ns clauses