| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…soft#22045) - Move python.analysis.restartLanguageServer command registration from individual language server managers to LanguageServerWatcher.register(), so it is always available regardless of which language server type is active - Fix async/forEach bug in restartLanguageServers() — forEach ignores returned Promises, so awaits inside were silently dropped; replaced with for...of - Fix resource URI reconstruction in restartLanguageServers() — map keys 'Pylance'/'None' are not URIs, Jedi keys are fsPath strings needing Uri.file() not Uri.parse() - Remove now-redundant static commandDispose and command registration from NodeLanguageServerManager and JediLanguageServerManager - Update unit tests: fix disposable count assertions, fix ICommandManager mocks, add test for restart command handler
|
@microsoft-github-policy-service agree |
Sorry, something went wrong.
|
Rich Chiodo (@rchiodo) Bill Schnurr (@bschnurr) Stella Huang (@StellaHuang95) could I get a review of this to confirm this is the desired behavior for this interaction |
Sorry, something went wrong.
|
The implementation appears to support Pylance through PylanceLSExtensionManager/NodeLanguageServerProxy, without requiring Pylance itself to register this command. However, the new test uses LanguageServerType.None and stubs NoneLSExtensionManager, so it only verifies that the command is registered and routed through the watcher when no language server is active. It does not verify the behavior this issue is primarily concerned with: that invoking the command actually stops and restarts Pylance. Could we add a Pylance-specific test that asserts the Pylance manager/client is stopped and started? |
Sorry, something went wrong.
|
Rich Chiodo (@rchiodo) what do you think about my above comment? |
Sorry, something went wrong.
Sounds good to me. Add a dummy pylance implementation and make sure it gets closed in the test? |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Fixes #22045
Problem
The python.analysis.restartLanguageServer command was previously owned by Pylance and was removed from it. The vscode-python extension registered the command handler inside individual manager constructors (NodeLanguageServerManager, JediLanguageServerManager), so it was only available when Pylance or Jedi was active — never when LanguageServerType.None was in use.
Additionally, LanguageServerWatcher.restartLanguageServers() had an async/forEach bug that silently discarded all awaits, and was never called from anywhere.
Changes
Testing
All 24 language server watcher unit tests pass (npm run test:unittests). Zero TypeScript errors (tsc --noEmit)