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

Provide --update-server command from executable #3124

Open
vinistock opened this issue Jan 31, 2025 · 0 comments
Open

Provide --update-server command from executable #3124

vinistock opened this issue Jan 31, 2025 · 0 comments
Labels
enhancement New feature or request pinned This issue or pull request is pinned and won't be marked as stale server This pull request should be included in the server gem's release notes

Comments

@vinistock
Copy link
Member

The relationship between the global ruby-lsp executable version vs the server version that actually gets run is often a source of confusion to users. Additionally, if some other gem is constraining our upgrades, users sometimes have trouble identifying which gem is holding back the upgrade.

On top of those, users with relative paths in their Bundler settings don't have a very easy way to upgrade because Bundler considers the Gemfile path to be the root of everything. If you have BUNDLE_PATH=vendor/bundle, then running this

BUNDLE_GEMFILE=.ruby-lsp/Gemfile bundle update ruby-lsp

Will install gems in .ruby-lsp/vendor/bundle because the path becomes relative to the Gemfile. All of this is not great and we can provide better tools for upgrades and diagnosing issues.

Let's add a ruby-lsp --update-server command that will simply run bundle update using our composed environment, with all Bundler settings turned into absolute paths (which is what we do while regular composition). Furthermore, if a gem is preventing the upgrade, it would be awesome if we could inform the user about which one it is.

@vinistock vinistock added enhancement New feature or request pinned This issue or pull request is pinned and won't be marked as stale server This pull request should be included in the server gem's release notes labels Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pinned This issue or pull request is pinned and won't be marked as stale server This pull request should be included in the server gem's release notes
Projects
None yet
Development

No branches or pull requests

1 participant