Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rescue NonExistingDocumentError in base server #2331

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

vinistock
Copy link
Member

Motivation

In #2313, I forgot that we need to rescue the new NonExistingDocumentError in base server, otherwise the TypeScript client tests will fail when VS Code opens some fake files automatically.

Implementation

Added the missing rescue.

@vinistock vinistock added bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes labels Jul 18, 2024
@vinistock vinistock self-assigned this Jul 18, 2024
@vinistock vinistock requested a review from a team as a code owner July 18, 2024 18:03
@vinistock vinistock requested review from andyw8 and st0012 July 18, 2024 18:03
@st0012
Copy link
Member

st0012 commented Jul 18, 2024

Should there be a test case for this though? Otherwise it'll be hard to tell if/when we'll need this in the future.

lib/ruby_lsp/base_server.rb Outdated Show resolved Hide resolved
@vinistock vinistock force-pushed the vs/rescue_non_existing_document_error branch from 4dd4873 to 229b4e9 Compare July 18, 2024 20:12
@vinistock
Copy link
Member Author

vinistock commented Jul 18, 2024

Should there be a test case for this though? Otherwise it'll be hard to tell if/when we'll need this in the future.

Added a test. Note that it has to be an integration test because the only way to reach the code path where we rescue is by reading the request from STDIN.

@vinistock vinistock enabled auto-merge (squash) July 18, 2024 20:22
@vinistock vinistock merged commit 91346f3 into main Jul 18, 2024
36 checks passed
@vinistock vinistock deleted the vs/rescue_non_existing_document_error branch July 18, 2024 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants