ac-cider icon indicating copy to clipboard operation
ac-cider copied to clipboard

Error when autocompleting a record in a namespace with a hyphen.

Open collinalexbell opened this issue 9 years ago • 2 comments

I know this is a very specific error reproduction, but I know why it is happening.

First, I can haz you reproduce it.

Start a new Lein project

Save the following to ./src/dameon/visual_cortex/derp.clj

(ns dameon.visual-cortex.derp)

(defrecord HerpDerp [Lerp])

C-c C-l to load derp.clj

Then go back into the buffer and type

(Herp

You will get a Cider Middleware Error

Here is what is happening: Go to the defrecord line and compile in place using C-c C-c You will see that dameon.visual_cortex.derp appears. Notice the underscore and not the hyphen.

Clojure converts all _ to -, but apparently not for records since they are Java classes.

collinalexbell avatar Aug 18 '16 09:08 collinalexbell

I can't tell if this is an error with cider itself. I think it might be.

collinalexbell avatar Aug 18 '16 09:08 collinalexbell

autogenerated with https://github.com/MalloZup/doghub: issue inactive since 450 days. Please update the issue or close it

MalloZup avatar Aug 05 '19 21:08 MalloZup