-
-
Notifications
You must be signed in to change notification settings - Fork 645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE autocompleting class names #1818
Comments
@arrdem Does it happen for any classnames, or specific ones? Could you please give some leads? |
@alexander-yakushev this (or some other NPE) was encountered pretty routinely last night hacking on |
@alexander-yakushev I am also facing the same issue with cider-nrepl version 0.14.0 and cider 0.14.0-snapshot. I have tested it with cider-nrepl version 0.13.0 and cider 0.14.0-snapshot I don't receive the error and completion. hello-world.core> (defrecord Animal [name])
hello-world.core.Animal
hello-world.core> (Animal. "hello")
#hello_world.core.Animal{:name "hello"}
hello-world.core> (Anim) When I try to autocomplete with point at Anim by pressing TAB I receive the error as above. |
Thanks @tirkarthi! Indeed, completing classes produced by defrecord threw NPE because, as it turns out, such classes don't have a package. Perhaps, there are other cases like that too, which @arrdem ran into. @bbatsov I'm deploying a fix as 0.3.1. |
I'm gonna guess that I was encountering something else. Sorry I haven't put together a demo, work's been busy and I'm prepping a talk for Thursday. Will try to get to it tomorrow. |
@alexander-yakushev OK, I'll update the dep. |
I think I encountered a related issue. system-info ;; CIDER 0.13.0 (California), nREPL 0.2.12
;; Clojure 1.8.0, Java 1.8.0_102 Steps to reproduce:
> (defrecord Person [name gender])
Typing the start of a keyword, triggering auto completion with company-mode, that isn't defined in the core namespace throws the error, e.g. > :my resulting error buffers content:
|
I can confirm issue reported by @qrthey. |
Do you have this issue with 0.14-snapshot as well? |
Yes, same NullPointerException. This almost empty leiningen project reproduces the error (see comments for details). |
I just tried this after another melpa update of 0.14.0snapshot
The middleware exception is no longer thrown. |
If CIDER 0.14.0-SNAPSHOT now uses Compliment 0.3.1, the defrecord problem should indeed be fixed. As for keyword error, I can't reproduce it on 0.14.0snapshot too, but I think I saw something similar before (but can't reproduce it now again). |
OK, so should we close this or not? |
I'm closing this for now. Feel free to reopen it if there still some issues (that can ideally be reliably reproduced). |
I haven't seen the issue occurring in a long time. Sorry for my late reply On Oct 9, 2016 09:58, "Bozhidar Batsov" notifications@github.com wrote:
|
Bug encountered autocompleting class names, CIDER 0.14.0-SNAPSHOT (package: 20160727.904), emacs latest, Clojure 1.8.
The text was updated successfully, but these errors were encountered: