neoclide / coc-python

Python extension for coc.nvim, fork of vscode-python
573 stars 51 forks source link

coc-python gives no completions ever #183

Open jsholmes opened 4 years ago

jsholmes commented 4 years ago

coc-python always times out.

I do see this in my log when trying to investigate.


2020-04-23T15:22:33.246 ERROR (pid:23697) [watchman] - Error: unable to resolve root /mnt/harmonix_vol2/soporifix_vol3/user/home/john: path uses the "nfs" filesystem and is disallowed by global config illegal_fstypes: relocate the dir to an allowed filesystem type
    at BunserBuf.<anonymous> (/mnt/harmonix_vol2/soporifix_vol3/user/home/john/.dotfiles/vim/linux_plugins/coc.nvim/build/index.js:34050:23)
    at BunserBuf.emit (events.js:321:20)
    at BunserBuf.process (/mnt/harmonix_vol2/soporifix_vol3/user/home/john/.dotfiles/vim/linux_plugins/coc.nvim/build/index.js:34575:10)
    at /mnt/harmonix_vol2/soporifix_vol3/user/home/john/.dotfiles/vim/linux_plugins/coc.nvim/build/index.js:34530:12
    at processTicksAndRejections (internal/process/task_queues.js:79:11) {
  watchmanResponse: {
    error: 'unable to resolve root /mnt/harmonix_vol2/soporifix_vol3/user/home/john: path uses the "nfs" filesystem and is disallowed by global config illegal_fstypes: relocate the dir to an allowed filesystem type',
    version: '4.9.0'
  }
}```

Do I need to tell the python extension to use some other path for its work somehow?
jsholmes commented 4 years ago

I've determined that it doesn't work if I'm in this workspace root, which is my actual project:

## versions

vim version: NVIM v0.5.0-dev
node version: v13.8.0
coc.nvim version: 0.0.78-6e3ecc04cf
term: screen-256color
platform: linux

## Output channel: Python

Starting Microsoft Python language server.
[Info  - 3:40:11 PM] Analysis cache path: /usr/scratch/john/.cache/Microsoft/Python Language Server
[Info  - 3:40:11 PM] Microsoft Python Language Server version 0.5.45.0
[Info  - 3:40:11 PM] Workspace root: /usr/scratch/john/hrt/dev
[Info  - 3:40:11 PM] GetCurrentSearchPaths /usr/local/venvs/algo3venv/bin/python
[Info  - 3:40:11 PM] Interpreter search paths:
[Info  - 3:40:11 PM]     /usr/lib/python3.6
[Info  - 3:40:11 PM]     /usr/lib/python3.6/lib-dynload
[Info  - 3:40:11 PM]     /usr/local/venvs/algo3venv/lib/python3.6/site-packages/_pdbpp_path_hack
[Info  - 3:40:11 PM]     /usr/local/venvs/algo3venv/lib/python3.6/site-packages
[Info  - 3:40:11 PM] User search paths:

## Output channel: watchman

[Info  - 3:40:09 PM] watchman watching project: /usr/scratch/john/hrt/dev
[Info  - 3:40:09 PM] subscribing "/usr/scratch/john/hrt/dev/.env" in /usr/scratch/john/hrt/dev
[Info  - 3:40:09 PM] subscribing "*/python" in /usr/scratch/john/hrt/dev
[Info  - 3:40:09 PM] subscribing "*/*/python" in /usr/scratch/john/hrt/dev
[Info  - 3:40:12 PM] subscribing "*/python" in /usr/scratch/john/hrt/dev
[Info  - 3:40:12 PM] subscribing "*/*/python" in /usr/scratch/john/hrt/dev

But does if I'm in this one, which is just a tmp dir:

## versions

vim version: NVIM v0.5.0-dev
node version: v13.8.0
coc.nvim version: 0.0.78-6e3ecc04cf
term: screen-256color
platform: linux

## Output channel: Python

Starting Microsoft Python language server.
[Info  - 3:41:17 PM] Analysis cache path: /usr/scratch/john/.cache/Microsoft/Python Language Server
[Info  - 3:41:17 PM] Microsoft Python Language Server version 0.5.45.0
[Info  - 3:41:17 PM] Workspace root: /usr/scratch/tmp
[Info  - 3:41:17 PM] GetCurrentSearchPaths /usr/local/venvs/algo3venv/bin/python
[Info  - 3:41:17 PM] Interpreter search paths:
[Info  - 3:41:17 PM]     /usr/lib/python3.6
[Info  - 3:41:17 PM]     /usr/lib/python3.6/lib-dynload
[Info  - 3:41:17 PM]     /usr/local/venvs/algo3venv/lib/python3.6/site-packages/_pdbpp_path_hack
[Info  - 3:41:17 PM]     /usr/local/venvs/algo3venv/lib/python3.6/site-packages
[Info  - 3:41:17 PM] User search paths:
[Info  - 3:41:18 PM] Initializing for /usr/local/venvs/algo3venv/bin/python
[Info  - 3:41:18 PM] Analysis caching mode: None.

## Output channel: watchman

[Info  - 3:41:15 PM] watchman watching project: /usr/scratch/tmp
[Info  - 3:41:15 PM] subscribing "/usr/scratch/tmp/.env" in /usr/scratch/tmp
[Info  - 3:41:15 PM] subscribing "*/python" in /usr/scratch/tmp
[Info  - 3:41:15 PM] subscribing "*/*/python" in /usr/scratch/tmp
[Info  - 3:41:18 PM] subscribing "*/python" in /usr/scratch/tmp
[Info  - 3:41:18 PM] subscribing "*/*/python" in /usr/scratch/tmp

So I guess the only difference there is that in the working one, I see these lines after User search paths:

[Info  - 3:41:17 PM] User search paths:
[Info  - 3:41:18 PM] Initializing for /usr/local/venvs/algo3venv/bin/python
[Info  - 3:41:18 PM] Analysis caching mode: None.
jsholmes commented 4 years ago

I think I've narrowed down the issue to this: https://github.com/Microsoft/python-language-server/issues/181

I tried building a local copy of MPLS to fix it, but when I copied the output dir over to what coc was using, it no longer worked. :(. I did notice lots of dlls were missing from the output dir. Is there something I have to do to get it to build everything I need for a full packaging?

jsholmes commented 4 years ago

New issue in mpls for this: https://github.com/microsoft/python-language-server/issues/2006