parse python clones pylsp fork into project root, then panics with "multiple pyproject.toml files found"
Repo: cloudwego/abcoder
Labels: bug, language/python
Summary
When abcoder parse python <path> runs for the first time and pylsp isn't on the system, the auto-installer (lib.go) does:
git clone -b abc https://github.com/Hoblovski/python-lsp-server.git pylsp
pip install -e ./pylsp
…in the current working directory, then registers it as an editable pip install pointing at <cwd>/pylsp. Every subsequent abcoder parse python . from that project then panics in lang/python/spec.go:
panic: multiple pyproject.toml files found
spec.go:75
spec.go:80 (PythonSpec.WorkSpace)
collect/export.go:99 (Collector.Export)
parse.go:205 (collectSymbol)
…because the workspace walker now sees ./pyproject.toml and ./pylsp/pyproject.toml. --exclude pylsp does not help: the walk in Export is independent of the parse exclude list.
Reproduction
cd /some/python-project-with-pyproject-toml
abcoder parse python . -o /tmp/ast.json
# … "Installing pylsp via pip ..." then "pylsp installed."
ls ./pylsp # <-- left behind in project root, registered as editable
abcoder parse python . -o /tmp/ast.json
# panic: multiple pyproject.toml files found
Expected
- pylsp should be cloned into a stable user cache directory (e.g.
${XDG_CACHE_HOME:-~/.cache}/abcoder/pylsp or ~/.abcoder/pylsp), never into CWD.
--exclude should also apply to the workspace walk in PythonSpec.WorkSpace / Collector.Export, so users can opt out of nested pyproject.toml files even when they exist.
Workaround
mv ./pylsp ~/.abcoder/pylsp
pip install -e ~/.abcoder/pylsp # re-register editable install at new location
Environment
- abcoder
v0.0.0-20260427034146-9d8ecc5873be+dirty
- macOS 25.3.0 (arm64)
- Python 3.10 (miniconda) for pylsp, Python 3.12 (uv
.venv) for project
- python-lsp-server fork:
Hoblovski/python-lsp-server@abc
parse pythonclones pylsp fork into project root, then panics with "multiple pyproject.toml files found"Repo: cloudwego/abcoder
Labels: bug, language/python
Summary
When
abcoder parse python <path>runs for the first time and pylsp isn't on the system, the auto-installer (lib.go) does:…in the current working directory, then registers it as an editable pip install pointing at
<cwd>/pylsp. Every subsequentabcoder parse python .from that project then panics inlang/python/spec.go:…because the workspace walker now sees
./pyproject.tomland./pylsp/pyproject.toml.--exclude pylspdoes not help: the walk inExportis independent of the parse exclude list.Reproduction
Expected
${XDG_CACHE_HOME:-~/.cache}/abcoder/pylspor~/.abcoder/pylsp), never into CWD.--excludeshould also apply to the workspace walk inPythonSpec.WorkSpace/Collector.Export, so users can opt out of nestedpyproject.tomlfiles even when they exist.Workaround
Environment
v0.0.0-20260427034146-9d8ecc5873be+dirty.venv) for projectHoblovski/python-lsp-server@abc