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

Use local executables when working on the Ruby LSP #3065

Merged

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Jan 15, 2025

Motivation

I was trying to make some more improvements to our launcher and I realized we were missing something we should have probably done about 2 years ago.

When working on the LSP itself, we don't use the local version of the launcher. We use the local version of the server, but only after the bundle has been composed. Composing the bundle uses whatever latest version is globally installed.

This is detrimental to us catching bugs in the launch process before releasing it to users. We need to change that.

Implementation

To ensure that the local version of the executable is always chosen when working on the LSP, I started mutating the PATH to include the exe directory.

That way, whenever ruby-lsp is invoked, the first thing that will be found is the local executable.

Automated Tests

Added a test to make sure the PATH is being mutated.

@vinistock vinistock added the chore Chore task label Jan 15, 2025 — with Graphite App
@vinistock vinistock requested review from andyw8 and st0012 January 15, 2025 15:25
Copy link
Member Author

vinistock commented Jan 15, 2025

@vinistock vinistock marked this pull request as ready for review January 15, 2025 15:29
@vinistock vinistock requested a review from a team as a code owner January 15, 2025 15:29
@vinistock vinistock force-pushed the 01-15-use_local_executables_when_working_on_the_ruby_lsp branch from 1399ed2 to 21a81e7 Compare January 15, 2025 16:21
@vinistock vinistock merged commit 7fb9adf into main Jan 15, 2025
44 checks passed
@vinistock vinistock deleted the 01-15-use_local_executables_when_working_on_the_ruby_lsp branch January 15, 2025 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants