fix(lsp): recognize Windows launcher shims during binary discovery#29310
Closed
Sylw3ster wants to merge 1 commit into
Closed
fix(lsp): recognize Windows launcher shims during binary discovery#29310Sylw3ster wants to merge 1 commit into
Sylw3ster wants to merge 1 commit into
Conversation
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.
Summary
On native Windows, an LSP server install could succeed while later discovery still reported the server as missing.
The npm install path already handled Windows
.cmdshims during the initial install, but the shared probe path only checked the bare binary name afterward. That meant follow-up paths likedetect_status(), manual/off strategy probes,hermes lsp which, and backend warning checks could miss an installed launcher such aspyright-langserver.cmd.This also affected pip-based LSP installs because Python console scripts commonly land under
Scripts/with.exelaunchers on Windows, while the installer only searchedpython-packages/bin/.Changes
agent/lsp/install.py..cmd.exe.batnode_modules/.bin.python-packages/Scripts/.hermes lsp whichand bash-language-server backend warning detection with the shared_existing_binary()path..cmdwrappers being treated as installedScripts/*.exelaunchers being linked into Hermes’ LSP bin directoryTests
git diff --check -- agent\lsp\install.py agent\lsp\cli.py tests\agent\lsp\test_install_and_lint_fixes.py
uv run --extra dev pytest -o addopts= tests\agent\lsp\test_install_and_lint_fixes.py -q
uv run --extra dev ruff check agent\lsp\install.py agent\lsp\cli.py tests\agent\lsp\test_install_and_lint_fixes.py
git diff --check: passed
pytest: 14 passed in 0.87s
ruff: All checks passed!