-
Notifications
You must be signed in to change notification settings - Fork 41
mspyls cannot analyze symlinked modules #56
Comments
According to the description, it seems the issue of the server configuration or itself. I didn't encounter such issue even with the large project (e.g. numpy, tensorflow). I suggest you to check if it exists in |
I'm opening a new issue cuz I found the problem is related to |
Sorry, I found it's still the problem that the project is too large to index. According to the instruction over here, I was able to resolve the popping message shows I need to increase the max watch. But it's not the problem anymore. I found it's related to Also, once I enabled jedi, I no longer has As far as I know, mspyls is an alternative for jedi. It's weird that Microsoft Python Language So I don't konw how to track and slove this problem at this point. Is there anything that you can Thank you! |
What happens if you uninstall jedi module? |
I guess it comes with vscode python package and I couldn't uninstall it. BTW, I found another issue might be the problem. The project has a |
I can confirm mspyls cannot resolve symlinked modules but vscode with jedi enabled can. Here is a repo I created for you to test https://github.com/ztlevi/python-test |
If so, you should file an issue for mslyls server. |
Yeah, maybe. But it seems work perfectly in vscode. Can you tell me to how inject couple setting into |
I can also confirm neither anaconda-mode, pyls or mspyls work in the project I created here. Instructions can be found in previous comments. I think it's a pretty common strategy to symlink some folder in project. For example, tensorflow symlinked a lot. Is there any solution or hack come across your mind that might solve the problem? Cuz if vscode works, mspyls should work as well. |
Let me correct this. |
Posted a issue in here microsoft/python-language-server#1545 |
I might find the problem! Does mspyls uses environment's PYTHONPATH?The hack that I have in my project is I modified the PYTHONPATH like this Maybe
|
@seagle0128 I figure out the solution! I tried to add This is something we need to document. And my suggestion would be utilizing |
So it's not a bug, right?
|
Ture. But my first insight is I thought extra paths is something specific to some project... |
You can make it local to try. |
@ztlevi Please test the latest version. |
@ztlevi how to solve this problem? how to set extra path specific to some project ? same probleom to me . |
@phenix3443 just use setq to set lsp-python-ms-extra-paths. It is not a local variable and need to be set before the lsp start |
@ztlevi i guess i should set lsp-python-ms-extra-path before load the lsp-python-ms.el, because when the file regist lsp client , it use lsp-python-ms-extra-path, which i want to be set dynamiclly. I use the following code:
key code is |
Uh oh!
There was an error while loading. Please reload this page.
I start to work on a very big project. And mspyls couldn't cache the project. The caching animation in my modeline keeps going forever.
The
lsp-log
looks fine.Click to expand!
Command "/home/ztlevi/.emacs.d/.local/etc/mspyls/Microsoft.Python.LanguageServer" is present on the path. Command "pyls" is not present on the path. Found the following clients for /home/ztlevi/av/detection/python/private/tools/tl_state_tracker_evaluation/groundtruth_provider.py: (server-id mspyls, priority 1) The following clients were selected based on priority: (server-id mspyls, priority 1) Analysis cache path: /home/ztlevi/.cache/Microsoft/Python Language Server GetCurrentSearchPaths /home/ztlevi/python/bin/python Interpreter search paths: /home/ztlevi/python/lib/python3.7 /home/ztlevi/python/lib/python3.7/lib-dynload /home/ztlevi/.local/lib/python3.7/site-packages /home/ztlevi/python/lib/python3.7/site-packages User search paths: Command "/home/ztlevi/.emacs.d/.local/etc/mspyls/Microsoft.Python.LanguageServer" is present on the path. Command "pyls" is not present on the path. Found the following clients for /home/ztlevi/Developer/mypy/setup.py: (server-id mspyls, priority 1) The following clients were selected based on priority: (server-id mspyls, priority 1) Analysis cache path: /home/ztlevi/.cache/Microsoft/Python Language Server GetCurrentSearchPaths /home/ztlevi/python/bin/python Interpreter search paths: /home/ztlevi/python/lib/python3.7 /home/ztlevi/python/lib/python3.7/lib-dynload /home/ztlevi/.local/lib/python3.7/site-packages /home/ztlevi/python/lib/python3.7/site-packages User search paths: Microsoft Python Language Server version 0.3.66.0 Initializing for /home/ztlevi/python/bin/python Command "/home/ztlevi/.emacs.d/.local/etc/mspyls/Microsoft.Python.LanguageServer" is present on the path. Command "pyls" is not present on the path. Found the following clients for /home/ztlevi/Developer/mypy/mypy/binder.py: (server-id mspyls, priority 1) The following clients were selected based on priority: (server-id mspyls, priority 1) Command "/home/ztlevi/.emacs.d/.local/etc/mspyls/Microsoft.Python.LanguageServer" is present on the path. Command "pyls" is not present on the path. Found the following clients for /home/ztlevi/Developer/mypy/mypy/nodes.py: (server-id mspyls, priority 1) The following clients were selected based on priority: (server-id mspyls, priority 1)Every time I try to trigger
lsp-ui-peek-find-definitions
, it gives me error messagelsp--send-request-async: No workspace could handle textDocument/definition
.But things works fine on smaller project, for example, https://github.com/python/mypy. I tried
lsp-ui-peek-find-definitions
in mypy project and everything works fine. It only breaks when I was in the large project.Is there any way that we could add some extra parameter to ignore caching some directory? This might be the answer.
I did a fresh install today so everything should be updated. And my emacs version is 26.3.
The text was updated successfully, but these errors were encountered: