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

Ensure update server gem command updates the locked server #2145

Merged
merged 2 commits into from
Jun 7, 2024

Conversation

vinistock
Copy link
Member

Motivation

Our current implementation of the update language server gem command only runs gem update ruby-lsp. But that's actually not relevant for the version of the server that actually gets booted since that's controlled by the version locked in .ruby-lsp/Gemfile.lock.

This PR ensures that both the global installation and the locked versions are updated.

Implementation

We use the method to install or update the server gem in two different places, so I introduced a parameter to indicate when the user manually requested an update.

In those cases, we now also delete the entire .ruby-lsp directory, so that the locked server of the gem is updated.

I also started re-booting the server after the update since it doesn't make sense to request an update, but then continue running the old version.

@vinistock vinistock added bugfix This PR will fix an existing bug vscode This pull request should be included in the VS Code extension's release notes labels Jun 7, 2024
@vinistock vinistock self-assigned this Jun 7, 2024
@vinistock vinistock requested a review from a team as a code owner June 7, 2024 16:02
@vinistock vinistock requested review from andyw8 and st0012 June 7, 2024 16:02
vscode/src/workspace.ts Outdated Show resolved Hide resolved
Co-authored-by: Kaan Ozkan <[email protected]>
@vinistock vinistock added blocked This issue can't move forward until a blocker is resolved and removed blocked This issue can't move forward until a blocker is resolved labels Jun 7, 2024
@vinistock vinistock merged commit 3a6fa2b into main Jun 7, 2024
34 checks passed
@vinistock vinistock deleted the vs/ensure_update_gem_removes_lock branch June 7, 2024 19:49
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 vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants