Open DetachHead opened 3 weeks ago
Thanks, that's really strange. @dhruvmanila, would you have any ideas here?
Interesting, not sure. I'd need to look
Installing pyprojectx
requires a pyproject.toml
file. What does that look like? Does it need to be specific to pyprojectx
?
sorry i shouldve updated the issue. pyprojectx is not required to reproduce the issue, i included those steps just in case but a colleague was able to reproduce the issue by installing uv normally.
i should also mention that i can't reproduce those ruff errors anymore, only the basedpyright errors.
sorry i shouldve updated the issue. pyprojectx is not required to reproduce the issue, i included those steps just in case but a colleague was able to reproduce the issue by installing uv normally.
So, should the steps be the following?
uv init
uv add ruff
uv add basedpyright
It's working fine on MacOS at least, let me (or ask someone) try it on a Windows machine.
hmm this is very odd, i can't seem to reproduce the issue anymore. i'll just close this issue for now and i will investigate further and reopen it once i have more info. sorry to waste your time
nevermind it does still happen with those steps, i just forgot to restart vscode so it was using the version of basedpyright bundled with the extension instead of the one in the venv.
also reproduced with the pyright pypi package
uv add pyright
uv run pyright --version
to trigger the wrapper thing to install the npm package (might not be necessary).vscode/settings.json
:
{
"glspc.languageId": "python",
"glspc.serverCommand": ".venv\\Scripts\\pyright-langserver.exe",
"glspc.serverCommandArguments": [
"--stdio"
]
}
starting glspc...
Server process exited with code 3221225477 and signal null
Server process exited with code 3221225477 and signal null
Server process exited with code 3221225477 and signal null
Server process exited with code 3221225477 and signal null
Server process exited with code 3221225477 and signal null
so i tried to investigate this further on my end and came to the conclusion that it's something to do with the basedpyright-langserver.exe
wrapper binary in .venv/Scripts
. after installing basdepyright with uv, replacing the one created by uv with the one created by pip makes it work again.
i also found that passing shell: true
when launching the language server from the vscode extension fixes it. https://github.com/DetachHead/basedpyright/pull/613
i'm not sure what's causing this, but for some reason all of my language servers are crashing with strange errors when running from a venv created by uv (tested with both ruff and basedpyright language servers).
to reproduce
./pw uv add ruff
./pw uv add basedpyright
click the Output tab in the terminal and select "Ruff" from the dropdown
my venv does include the
pyvenv.cfg
file so i don't know why that error is occurring:environment info
windows 11, python 3.12, vscode 1.92.2, uv 0.3.1, ruff 0.6.1