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

Test not reloading VS Code when changing language servers #18964

Closed
3 tasks done
kimadeline opened this issue Apr 20, 2022 · 0 comments
Closed
3 tasks done

Test not reloading VS Code when changing language servers #18964

kimadeline opened this issue Apr 20, 2022 · 0 comments

Comments

@kimadeline
Copy link

kimadeline commented Apr 20, 2022

Refs: #18509

Complexity: 4

Create Issue


Special consideration for web

We currently have limited support for language servers in a web environment: In-file intellisense should be available, but that should be it.

Requirements

  • Make sure you have the Pylance and Jupyter extensions installed
  • Use any stable Python 3 version
  • Use the latest pre-release version of the Python extension
  • Make sure your workspaces contain at least one Python file and one notebook

Scenario 1: Single-root workspace

Verify the following when opening a Python file in a single-root workspace:

  • Starting {Pylance/Jedi} language server for {workspace basename} should be printed in the Python output channel
  • The Python Language Server output channel should be available
  • Intellisense should work in a Python file
  • When switching language servers, no prompt to reload should appear, and a new Starting.... should appear
  • If switching to None, Editor support is inactive since language server is set to None for {workspace basename}. should appear in the Python output channel
  • Intellisense should still show something when changing Python interpreters
  • Intellisense should work in a Jupyter notebook

Scenario 2: Multi-root workspace

Note that Pylance has multiroot-workspace awareness while Jedi doesn't, so Intellisense results will differ depending on which language server you use.

Verify the following when opening Python files in a multi-root workspace:

  • If using Jedi, there should be as many Starting Jedi language server for {workspace basename} printed in the Python output channel as there are workspace folders (might require opening a file in each folder)
  • If using Pylance, there should only be one Starting Pylance language server for {workspace basename} printed in the Python output channel
  • The Python Language Server output channel should be available
  • Intellisense should work
  • When switching language servers, no prompt to reload should appear, and new Starting.... lines should appear
  • If switching to None, Editor support is inactive since language server is set to None for {workspace basename}. should appear in the Python output channel only once
  • Intellisense should still show something when changing Python interpreters
  • Intellisense should work in a Jupyter notebook

Scenario 3: Pylance not installed

  • Uninstall Pylance
  • Make sure that the value for the user setting python.languageServer is Default or Pylance, and make sure that the test workspace has no value for the python.languageServer setting
  • Open a workspace with a Python file and open the Python file to trigger an extension load
  • Verify that a prompt appears with 3 options: Install Pylance, revert to Jedi, remind me later
  • Verify that selecting the "Revert to Jedi" option starts up the Jedi language server (check the line in the Python output channel, check that the Python Language Server output channel exists, check Intellisense)
  • Verify that selecting the "Remind me later" option dismisses the prompt and does not start up any language server
  • Verify that selecting the "Install Pylance" option takes you to the Pylance extension page, and that once you install Pylance the Pylance language server should be started (check the line in the Python output channel, check that the Python Language Server output channel exists, check Intellisense)
@github-actions github-actions bot added the triage-needed Needs assignment to the proper sub-team label Apr 20, 2022
@kimadeline kimadeline removed the triage-needed Needs assignment to the proper sub-team label Apr 20, 2022
@joyceerhl joyceerhl added this to the April 2022 milestone Apr 25, 2022
@meganrogge meganrogge removed their assignment Apr 26, 2022
@sbatten sbatten assigned sbatten and unassigned roblourens Apr 26, 2022
@sbatten sbatten removed their assignment Apr 26, 2022
@hediet hediet removed their assignment Apr 27, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants