Skip to content
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

Wrong type argument: listp, kind #480

Closed
topcpper opened this issue Nov 29, 2018 · 10 comments
Closed

Wrong type argument: listp, kind #480

topcpper opened this issue Nov 29, 2018 · 10 comments

Comments

@topcpper
Copy link

topcpper commented Nov 29, 2018

Describe the bug
when i compile the lsp.el .
it appears an error "lsp.el:1747:1:Error: Wrong type argument: listp, kind"

emacs version 26.1

To Reproduce
Steps to reproduce the behavior:

Expected behavior
A clear and concise description of what you expected to happen.

Which Language Server did you use
Mention which server/language did you use (e. g. lsp-python, lsp-ccls, lsp-java, etc)
lsp-python
OS
Which os do you use?
win7

Error callstack
If there is an error please reproduce the issue with toggle-debug-on-error and after setting lsp-print-io to t, and then include the callstack and attach the content of *Messages* buffer.

Compiling file d:/Program/emacs/.emacs.d/elpa/lsp-mode-20181128.640/lsp.el at Thu Nov 29 14:18:30 2018

In lsp--make-diag:
lsp.el:757:16:Warning: reference to free variable ‘severity’
lsp.el:758:12:Warning: reference to free variable ‘code’
lsp.el:759:14:Warning: reference to free variable ‘source’
lsp.el:760:50:Warning: reference to free variable ‘message’

In lsp--server-register-capability:
lsp.el:1091:43:Warning: reference to free variable ‘id’
lsp.el:1091:54:Warning: reference to free variable ‘method’
lsp.el:1091:70:Warning: reference to free variable ‘registerOptions’
lsp.el:1747:1:Error: Wrong type argument: listp, kind
@yyoncho
Copy link
Member

yyoncho commented Nov 29, 2018

Can you update your dash version? If this does not fix the issue, can you call toggle debug on error and attach the callstack?

@topcpper
Copy link
Author

Can you update your dash version? If this does not fix the issue, can you call toggle debug on error and attach the callstack?

dash 20180910.1856 installed
it was the recent version.

@topcpper
Copy link
Author

Can you update your dash version? If this does not fix the issue, can you call toggle debug on error and attach the callstack?

thank, it was ok after the dash was updated

@gnprice
Copy link

gnprice commented Dec 8, 2018

I get the same compilation error. I have dash-20180910.1856 installed, which is the latest; and I'm on Emacs 25.1.

Here's the code in question -- the line in the error is the start of this defun:

(defun lsp--annotate (item)
  "Annotate ITEM detail."
  (-let (((&hash "detail" "kind" kind-index) (plist-get (text-properties-at 0 item) 'lsp-completion-item))
         kind)
    ;; We need check index before call `aref'.
    (when kind-index
      (setq kind (aref lsp--completion-item-kind kind-index))
      (concat " " detail (when kind (format " (%s)" kind))))))

I'm not familiar enough with dash to say whether or how there's an issue there; but the compiler seems to think so.

@yyoncho
Copy link
Member

yyoncho commented Dec 8, 2018

Can you reinstall lsp-mode and check whether the issue is still reproducible? You you have updated lsp-mode and dash at the same pass it is possible to get compilation error(like in #510 )

@gnprice
Copy link

gnprice commented Dec 8, 2018

Hmm, interesting that that can matter...

I just did i, x in the package list to install lsp-mode, and nothing changed.

I'll try uninstalling it and then installing it again.

@gnprice
Copy link

gnprice commented Dec 8, 2018

Nope, same result. I removed the packages lsp-mode and lsp-ui, the only lsp-related packages I had; made sure dash was installed; then installed lsp-mode and lsp-ui again. Same error shows up in *Compile-Log* from doing the install (as it did when I first upgraded to this version earlier today.)

@yyoncho
Copy link
Member

yyoncho commented Dec 8, 2018

Hm, I have pushed a new version into melpa, once it is ready I will try to reproduce the issue. Is #517 still reproducible?

@gnprice
Copy link

gnprice commented Dec 8, 2018

Great, thanks! I had noticed that you've been pushing some significant changes recently :-)

It is -- and with a stack trace now! I'll follow up there.

@gnprice
Copy link

gnprice commented Dec 8, 2018

With @yyoncho 's help, I resolved this by running M-x byte-compile-file on dash.el. Details in #517 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants