fix(python): install pylsp outside project workspaces#201
Open
March-77 wants to merge 1 commit into
Open
Conversation
March-77
marked this pull request as ready for review
July 23, 2026 03:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
fix
Check the PR title.
<type>(optional scope): <description>(Optional) Translate the PR title into Chinese.
fix(python): 在项目工作区之外安装 pylsp
(Optional) More detailed description for this PR(en: English/zh: Chinese).
en:
The Python language-server installer previously cloned its pylsp fork into the current working directory. That polluted the project being parsed and introduced another
pyproject.toml, whilePythonSpec.WorkSpacepanicked as soon as it saw more than one.This change:
os.UserCacheDir()/abcoder/pylsp;pyproject.tomlcounting walk, which never contributed to module discovery and only caused the panic;Validation:
go test ./lang/python -count=20go test -race ./lang/python -count=1go vet ./lang/pythongolangci-lint run --new-from-rev=origin/main ./lang/pythonThe repository-wide CI-equivalent command was also attempted locally. Python and most packages passed; the remaining failures were Windows environment/toolchain issues in Rust/rust-analyzer and gopls path handling, outside this change. The repository CI runs these checks on Ubuntu.
zh(optional):
pylsp 现在安装到用户缓存目录;临时 clone 完成并校验后再原子发布,避免并发或中断安装留下半成品。Python workspace 不再因嵌套
pyproject.toml崩溃。(Optional) Which issue(s) this PR fixes:
Fixes #185
(optional) The PR that updates user documentation:
N/A