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

Language server does not start in macOS application (master) #14923

Closed
mrclary opened this issue Mar 12, 2021 · 6 comments · Fixed by #14930
Closed

Language server does not start in macOS application (master) #14923

mrclary opened this issue Mar 12, 2021 · 6 comments · Fixed by #14930
Milestone

Comments

@mrclary
Copy link
Contributor

mrclary commented Mar 12, 2021

What steps will reproduce the problem?

The language server does not appear to start in the macOS standalone application and command completion does not work.

Also, when running debug mode there does not appear to be any lsp logs produced. Are these in a new location?

System

  • Spyder version: 5.0.0.dev0 1dd460b (latest master)
  • Python version: 3.9.1 64-bit
  • Qt version: 5.12.10
  • PyQt5 version: 5.12.3
  • Operating System: Darwin 19.6.0
# Mandatory:
applaunchservices >=0.1.7   :  0.2.1 (OK)
atomicwrites >=1.2.0        :  1.4.0 (OK)
chardet >=2.0.0             :  4.0.0 (OK)
cloudpickle >=0.5.0         :  1.6.0 (OK)
cookiecutter >=1.6.0        :  1.7.2 (OK)
diff_match_patch >=20181111 :  20200713 (OK)
intervaltree >=3.0.2        :  3.1.0 (OK)
IPython >=7.6.0             :  7.21.0 (OK)
jedi =0.17.2                :  0.17.2 (OK)
jsonschema >=3.2.0          :  3.2.0 (OK)
keyring >=17.0.0            :  23.0.0 (OK)
nbconvert >=4.0             :  6.0.7 (OK)
numpydoc >=0.6.0            :  1.1.0 (OK)
parso =0.7.0                :  0.7.0 (OK)
pexpect >=4.4.0             :  4.8.0 (OK)
pickleshare >=0.4           :  0.7.5 (OK)
psutil >=5.3                :  5.8.0 (OK)
pygments >=2.0              :  2.8.1 (OK)
pylint >=1.0                :  2.7.2 (OK)
pyls >=0.36.2;<1.0.0        :  v5.0.0a5+145.g1dd460bf5 (OK)
pyls_black >=0.4.6          :  0.4.6 (OK)
pyls_spyder >=0.3.2         :  0.3.2 (OK)
qdarkstyle >=2.8            :  2.8.1 (OK)
qtawesome >=0.5.7           :  1.0.2 (OK)
qtconsole >=5.0.1           :  5.0.2 (OK)
qtpy >=1.5.0                :  1.9.0 (OK)
setuptools >=39.0.0         :  54.1.1 (OK)
sphinx >=0.6.6              :  3.5.2 (OK)
spyder_kernels >=2.0.0dev0  :  2.0.0.dev0 (OK)
textdistance >=4.2.0        :  4.2.1 (OK)
three_merge >=0.1.1         :  0.1.1 (OK)
watchdog >=0.10.3;<2.0.0    :  1.0.2 (OK)
zmq >=17                    :  22.0.3 (OK)

# Optional:
cython >=0.21               :  0.29.22 (OK)
matplotlib >=2.0.0          :  3.3.4 (OK)
numpy >=1.7                 :  1.20.1 (OK)
pandas >=1.1.1              :  1.2.3 (OK)
scipy >=0.17.0              :  1.6.1 (OK)
sympy >=0.7.3               :  1.7.1 (OK)
@ccordoba12
Copy link
Member

The language server does not appear to start in the macOS standalone application and command completion does not work.

Now our code completion architecture uses setuptools entry points for its providers (LSP, Kite, Fallback and Snippets). So that could be causing issues in our Mac app.

Also, when running debug mode there does not appear to be any lsp logs produced. Are these in a new location?

I guess the server is not even started in the app because the logs are generated as expected.

@mrclary
Copy link
Contributor Author

mrclary commented Mar 13, 2021

Okay, I'm not sure what to do with that...

@mrclary
Copy link
Contributor Author

mrclary commented Mar 14, 2021

Okay, I've partially solved the issue. Indeed the LSP server was not being launched because the plugin was not found. This was because it was not listed in Spyder's entry-points. #14930 should resolve this.

I said partially fixed since now the LSP server starts and command completion seems to be functioning properly according to the logs, but command completion does not show in the editor for results outside the active document. Images attached.

I have a module located in an entry in the PYTHONPATH Manager: c2w_psp

First, from bootstrap everything works as expected; note the LSP server log behind the Spyder window indicating the completion result list...
Screen Shot 2021-03-13 at 10 45 18 AM

Next from macOS application build. For a completion in the active document, the completion is visible in the Editor and server log shown behind Spyder window.
Screen Shot 2021-03-13 at 10 47 17 AM

However, for the module, the server log shows that the completion is working properly, but it does not show up in the Editor.
Screen Shot 2021-03-13 at 10 46 38 AM

Any ideas on what could be causing this?

@ccordoba12
Copy link
Member

Are completions working for standard modules? I mean, math, subprocess, etc?

@mrclary
Copy link
Contributor Author

mrclary commented Mar 14, 2021

Okay, hmm. I cannot reproduce the final completions issue. Everything seems to be working properly. Maybe I had something wonky in my build environment. Anyway, wiped conda and build environments, re-tested and everything seems okay.

@mrclary
Copy link
Contributor Author

mrclary commented Mar 14, 2021

Just to clarify, #14930 should entirely resolve this issue.

@ccordoba12 ccordoba12 added this to the v5.0alpha6 milestone Mar 15, 2021
@ccordoba12 ccordoba12 changed the title Language server does not start in macOS application Language server does not start in macOS application (master) Mar 15, 2021
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

Successfully merging a pull request may close this issue.

2 participants