Skip to content

Commit

Permalink
Pin VSCode Python extension to avoid breaking Jedi
Browse files Browse the repository at this point in the history
The VSCode Python extension works with either the proprietary Microsoft
extension Pylance or the open-source Jedi language server. Microsoft
expectedly provides less support for Jedi than for Pylance, leading to
occasional issues.
02033b8
1c68b3f
microsoft/vscode-python#15858

The latest extension release, [email protected] (2023-10-05),
appears not to install Jedi at all. Updating from 2023.16.0 to 2023.18.0
with the setting `"python.languageServer": "Jedi"` results in a crash
with `ModuleNotFoundError: No module named 'jedi_language_server'`.
This error appears with [email protected] on VSCodium 1.83.0
but not [email protected] on VSCode 1.83.0. As the error is not
occuring in Microsoft's official VSCode builds, they may not address it.
It may be a problem specific to the extension on Open VSX, the extension
marketplace VSCodium uses.

It appears that the extension is not installing the Jedi language server
at all in VSCodium. The entire `jedilsp` directory is missing.

```sh
# VSCodium extension files
~
❯ ls -la ~/.vscode-oss/extensions/ms-python.python-2023.18.0-universal/pythonFiles/lib/
total 0
drwxr-xr-x   3 brendon  staff   96 Oct  7 16:58 .
drwxr-xr-x  29 brendon  staff  928 Oct  7 16:58 ..
drwxr-xr-x  15 brendon  staff  480 Oct  7 16:58 python

# VSCode extension files
~
❯ ls -la ~/.vscode/extensions/ms-python.python-2023.18.0/pythonFiles/lib/
total 0
drwxr-xr-x@  4 brendon  staff   128 Oct  7 17:11 .
drwxr-xr-x@ 29 brendon  staff   928 Oct  7 17:11 ..
drwxr-xr-x@ 32 brendon  staff  1024 Oct  7 17:12 jedilsp
drwxr-xr-x@ 15 brendon  staff   480 Oct  7 17:11 python
```

Reverting to 2023.16.0 fixes the issue.

```sh
~
❯ ls -la ~/.vscode-oss/extensions/ms-python.python-2023.16.0-universal/pythonFiles/lib
total 0
drwxr-xr-x@  4 brendon  staff   128 Oct  7 17:54 .
drwxr-xr-x@ 29 brendon  staff   928 Oct  7 17:54 ..
drwxr-xr-x@ 35 brendon  staff  1120 Oct  7 17:54 jedilsp
drwxr-xr-x@ 15 brendon  staff   480 Oct  7 17:54 python
```

microsoft/vscode-python#19807 (reply in thread)
https://open-vsx.org/extension/ms-python/python
  • Loading branch information
br3ndonland committed Oct 7, 2023
1 parent 289a08f commit 77f8cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vscode/extensions/marketplace-open-vsx.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ms-python.black-formatter
ms-python.flake8
ms-python.isort
ms-python.mypy-type-checker
ms-python.python
ms-python.python@2023.16.0
redhat.vscode-yaml
streetsidesoftware.code-spell-checker
tamasfe.even-better-toml
Expand Down

0 comments on commit 77f8cb0

Please sign in to comment.