pythonic-emacs / anaconda-mode

Code navigation, documentation lookup and completion for Python.
GNU General Public License v3.0
708 stars 87 forks source link

xref error in process when no definitions found #297

Closed valignatev closed 6 years ago

valignatev commented 6 years ago

Hi, I'm testing new xref-integration, and it works quite good for now. One thing I've noticed is that when there is no definitions found, we get following error message:

error in process filter: eieio--validate-slot-value: Invalid slot type: xref-file-location, file, string, nil
error in process filter: Invalid slot type: xref-file-location, file, string, nil

I guess that it suppose to be something like "no definitions found"

proofit404 commented 6 years ago

Hi, thanks for giving it a try!

No definition protection is already set up. I think this is the case where the function is written in C. In this case, we should have module name but no file and line.

Can you provide some examples? Want to test it myself.

Regards, Artem.

valignatev commented 6 years ago

I can reproduce with this example:

from collections import defaultdict

a = 1
b = defaultdict
a.to_bytes()

Cryptic error occurs when I'm trying to go to the definitions of both a and defaultdict.

proofit404 commented 6 years ago

Fixed in b0dec9970cd6719200104487355aeaf3aca50900

valignatev commented 6 years ago

Can confirm it works, thanks! :heart: