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

Add some necessary guards for operating with a partial bundle #2797

Merged
merged 1 commit into from
Oct 29, 2024

Conversation

vinistock
Copy link
Member

Motivation

For launcher mode #2774, we will need to add some necessary guards for operating with a partial bundle. For example, if Bundler.setup fails, then the load path is not going to be configured and we cannot try to load RuboCop.

Similarly, since we will start allowing running the server even the top level bundle isn't locked yet, we need to protect requests like workspace dependencies.

Implementation

Just added a few necessary guards to prevent breaking under failure scenarios.

@vinistock vinistock added server This pull request should be included in the server gem's release notes other Changes that aren't bugfixes, enhancements or breaking changes labels Oct 29, 2024
@vinistock vinistock self-assigned this Oct 29, 2024
@vinistock vinistock requested a review from a team as a code owner October 29, 2024 14:32
@vinistock vinistock requested review from andyw8 and st0012 October 29, 2024 14:44
Copy link
Member

@st0012 st0012 left a comment

Choose a reason for hiding this comment

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

Nice 👍
With these guards and the launcher, will we be able to start ruby-lsp without Gemfile?

@vinistock
Copy link
Member Author

It's already possible to start without a Gemfile, but this makes it possible to start if you are only missing the lockfile or if Bundler.setup fails.

@vinistock vinistock merged commit 30e770a into main Oct 29, 2024
36 of 37 checks passed
@vinistock vinistock deleted the vs-add-guards-for-missing-bundle branch October 29, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other Changes that aren't bugfixes, enhancements or breaking changes 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.

2 participants