Skip to content
This repository was archived by the owner on Jun 24, 2026. It is now read-only.

Try all possible python paths when launching language server - #66

Merged
jmanuel1 merged 16 commits into
masterfrom
fix-lsp-startup
Dec 18, 2025
Merged

Try all possible python paths when launching language server#66
jmanuel1 merged 16 commits into
masterfrom
fix-lsp-startup

Conversation

@jmanuel1

Copy link
Copy Markdown
Owner

No description provided.

@jmanuel1
jmanuel1 requested a review from Copilot December 17, 2025 17:57
@jmanuel1 jmanuel1 self-assigned this Dec 17, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modifies the language server startup logic to try multiple Python executable paths instead of just using the first one. If a Python path fails with an ENOENT error, the client now recursively tries the next path in the list until a working Python executable is found or all paths are exhausted.

Key Changes:

  • Implemented recursive fallback logic for trying multiple Python paths when starting the language server
  • Extracted isErrnoException helper function to a shared error utility module
  • Added comprehensive test coverage for both success and failure scenarios

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
language-concat/lib/lsp-client.ts Added startServerProcessUsingFoundPython method with recursive fallback logic and process error handling
language-concat/lib/error.ts Created new shared utility module for the isErrnoException type guard function
language-concat/lib/concat.ts Removed local isErrnoException function in favor of imported shared version
language-concat/spec/lsp-client-spec.js Added test cases for successful server startup with multiple paths and error handling when Python is not found

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread language-concat/spec/lsp-client-spec.js Outdated
Comment thread language-concat/lib/lsp-client.ts
Comment thread language-concat/lib/lsp-client.ts Outdated
@coveralls

coveralls commented Dec 17, 2025

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 80.639%. remained the same
when pulling 3da2041 on fix-lsp-startup
into 9071963 on master.

@jmanuel1
jmanuel1 merged commit c3b6d10 into master Dec 18, 2025
16 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants