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

Should the server restart when .ruby-version is changed? #2583

Open
1 task done
Earlopain opened this issue Sep 20, 2024 · 1 comment
Open
1 task done

Should the server restart when .ruby-version is changed? #2583

Earlopain opened this issue Sep 20, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@Earlopain
Copy link
Contributor

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

Ruby now plans to to a patch release every two months or so, and repos are inconsistent about updaing their .ruby-version file. Here for example it declares 3.3.4 at the moment even though 3.3.5 is released. I make a habbit of removing previous patch releases when a new one releases and just hand-edit the .ruby-version file, no big deal. But I also have to manually reload the window to make ruby-lsp pick it up.

Should this happen automatically, same as with lockfile changes?

Description

See above

Implementation

No response

@Earlopain Earlopain added the enhancement New feature or request label Sep 20, 2024
@vinistock
Copy link
Member

vinistock commented Sep 20, 2024

Thank you for the feature proposal!

Yes, we should definitely auto-reload if the .ruby-version change. Perhaps just watching the file to trigger the reload is enough? It would be good to give it a try just to ensure it works as expected.

We received this bug report #2411 which is related.

I wonder if which file to watch shouldn't be controlled by the version manager integrations. Maybe the extension's Ruby object can expose something like ruby.versionDefinitionFilePath so that we can use .ruby-version, but also .tools-versions and mise.toml.

Then the Workspace can ask the Ruby object which file to watch and register a watcher like we do for the lockfile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants