Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Avoid running bundler commands before running custom bundle logic #721

Merged
merged 2 commits into from
Jul 25, 2023

Conversation

vinistock
Copy link
Member

Motivation

I believe these are the issues reported here #664 (comment).

We can't make any bundler inquiries before starting the server. Now that the custom bundle logic runs on the server, the bundle will only be installed after the server booted successfully. Trying to read the server version before starting will always fail if the gems aren't installed (because we haven't run bundle install yet).

Additionally, we need to fully deprecate Ruby 2.7. Because the gem now requires Ruby >=3.0, using gem install ruby-lsp will never install v0.7.3, which means it's impossible to use the extension with Ruby 2.7.

Implementation

  • Moved the server version check after the custom bundle logic
  • Changed the Ruby version check

@vinistock vinistock added the bugfix This PR will fix an existing bug label Jul 25, 2023
@vinistock vinistock added this to the 2023-Q3 milestone Jul 25, 2023
@vinistock vinistock requested a review from a team as a code owner July 25, 2023 15:52
@vinistock vinistock self-assigned this Jul 25, 2023
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.

Unfortunately I can't reproduce the issue I saw anymore, so I can't confirm that it'd be fixed with the change. But I think it's likely that the issue was caused by the mentioned problem 👍

@vinistock vinistock merged commit d3bd30c into main Jul 25, 2023
5 checks passed
@vinistock vinistock deleted the vs/fix_custom_bundle_bugs branch July 25, 2023 18:33
@andyw8
Copy link
Contributor

andyw8 commented Jul 25, 2023

Additionally, we need to fully deprecate Ruby 2.7

We should make sure to highlight this in the release notes.

@st0012
Copy link
Member

st0012 commented Jul 25, 2023

@vinistock Would the Ruby 2.7 error be raised to users who specify ruby-lsp versions in Gemfile too?

@vinistock
Copy link
Member Author

Yes. This is a complete drop of 2.7.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bugfix This PR will fix an existing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants