Comments (14)
Thank for the report, Matthew!
Hey @samaaron - any thoughts on this?
from ac-nrepl.
No bells immediately ring. I'm super busy tonight and tomorrow, but I can take a look at it on Friday if nobody beats me to it...
from ac-nrepl.
Okay, so I can't reproduce this problem. Admittedly, the ac-nrepl-refresh-class-cache
function can take a while to complete (while displaying the message "Caching JVM class names..."), but then everything proceeds correctly, and nrepl-interaction-mode
is enabled in existing clojure-mode
buffers.
Now, given that you've tried setting debug-on-error
and not seen tracebacks, then I don't really know what might be going on here. What's the value of nrepl-connected-hook
before you reverse
it?
from ac-nrepl.
Sorry, I should be asking @kencausey that, since he filed the original issue with nrepl.
from ac-nrepl.
Without reversing it nrepl-connected-hook contains '(ac-nrepl-refresh-class-cache nrepl-enable-on-existing-clojure-buffers). I'm still able to reproduce the problem which is the inability to use ctrl-x ctrl-e in a clojure buffer (no lisp sub-process error). The variable inferior-lisp-buffer is nil.
from ac-nrepl.
OK, so I hadn't in fact updated my emacs packages in a while. Perhaps @mjwillson is similarly out of date?
Once I had updated nrepl and ac-nrepl it works fine (in my quick testing) without need to reverse the hook variable. I believe this issue can be closed and considered fixed.
from ac-nrepl.
Great, thanks - that was my guess too, since I couldn't reproduce the issue. :-)
from ac-nrepl.
I'm using emacs live. When executing M-x nrepl-ritz-jack-in
, my environment would hang on the call, after Caching JVM class names... was printed out. I tried updating nrepl and ac-nrepl (using M-x package-install
), but that didn't fix the problem. I ended up directly editing ~/.emacs.d/packs/live/clojure-pack/lib/ac-nrepl/ac-nrepl.el, commenting out the call to (ac-nrepl-cache-all-classes). And that solved my problem.
I'm more than willing to go with a more elegant solution. But this gets me up and running now.
from ac-nrepl.
Hi there,
a more elegant solution would be appreciated. I haven't managed to get ritz
working alongside Emacs Live - I tried briefly a couple of times with no success and didn't really put in the effort to get it to work. It would be nice though.
Do you have any thoughts as to why the class caching is the issue here?
from ac-nrepl.
@samaaron From my side, I haven't even any idea about what's going wrong. Though in 30459da I changed the position of the class cache function in the nrepl hook chain.
from ac-nrepl.
@purcell I have no idea what's going wrong either!
However, I have noticed that the cache isn't updated across JVM reboots any more (unless the original *nrepl*
buffer is manually killed). I still end up swimming in multiple *nrepl-n*
buffers :-)
from ac-nrepl.
@purcell In ac-nrepl.el, my commented code now looks like this (see here).
@samaaron And I'm still an emacs novice. So it's hard for me to know what's causing the class caching issue. But when I look at the ac-nrepl-fetch-all-classes function (see here), this looks suspicious: (concat @complete.core/nested-classes @complete.core/top-level-classes)
.
from ac-nrepl.
@twashing what looks suspicious about that excerpt?
from ac-nrepl.
@samaaron Oh right... just the fact that there could be recursive calls made to classes and/or their nested classes. For example, before I commented out that bit of code, my project.clj had a :resource-paths entry that included src/ and test/: :profiles {:dev {:resource-paths ["src/" "test/" "etc/resources/"]...
. And that definitely hung the nrepl-ritz-jack-in (but not nrepl-jack-in) after the Caching JVM class names... message. When I removed the src/ and test/ entries, the hang went away (although came back for other reasons). So again, this is just conjecture on my part. But it seems that the ac-nrepl-fetch-all-classes function hangs under some conditions. And it seems possible that concat'g top-level and nested classes can get stuck in some loop, based on a classpath (or some environment).
from ac-nrepl.
Related Issues (20)
- Long docstrings in ac-nrepl-popup-doc get cut off HOT 3
- nrepl.el needs huge amounts of time to do autocompletion HOT 7
- nrepl.el needs huge amounts of time to do autocompletion HOT 1
- Support company-mode? HOT 44
- Is it possible to use ac-nrepl with ritz? HOT 5
- Intermittent error HOT 16
- ac-source-nrepl-vars conflict with yasnippet? HOT 3
- ac-nrepl displays nothing, java hogs cpu HOT 2
- ac-nrepl-popop-doc causes "Wrong type argument"
- ac-nrepl perceptibly slow. Any way to speed up? HOT 5
- Namespace hint gets expanded into the code HOT 12
- No completion for unsourced namespace HOT 3
- references to nrepl-current-ns break when used with cider HOT 1
- Documentation pop-up only in repl, not in file buffers HOT 12
- ac-nrepl makes auto-complete very slow HOT 1
- Solved: ac-nrepl installed via package.el doesn't work because `cider-0.1' is unavailable HOT 2
- Remove eval'd clojure code in favor of cider's cider-dispatch-complete-symbol HOT 9
- ac-fuzzy-complete not works HOT 5
- .emacs slowdown HOT 5
- No pop up document is showing HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ac-nrepl.