Giter VIP home page Giter VIP logo

Comments (14)

purcell avatar purcell commented on May 26, 2024

Thank for the report, Matthew!

Hey @samaaron - any thoughts on this?

from ac-nrepl.

samaaron avatar samaaron commented on May 26, 2024

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.

purcell avatar purcell commented on May 26, 2024

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.

purcell avatar purcell commented on May 26, 2024

Sorry, I should be asking @kencausey that, since he filed the original issue with nrepl.

from ac-nrepl.

kencausey avatar kencausey commented on May 26, 2024

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.

kencausey avatar kencausey commented on May 26, 2024

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.

purcell avatar purcell commented on May 26, 2024

Great, thanks - that was my guess too, since I couldn't reproduce the issue. :-)

from ac-nrepl.

twashing avatar twashing commented on May 26, 2024

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.

samaaron avatar samaaron commented on May 26, 2024

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.

purcell avatar purcell commented on May 26, 2024

@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.

samaaron avatar samaaron commented on May 26, 2024

@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.

twashing avatar twashing commented on May 26, 2024

@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.

samaaron avatar samaaron commented on May 26, 2024

@twashing what looks suspicious about that excerpt?

from ac-nrepl.

twashing avatar twashing commented on May 26, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.