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

Unify ruby-lsp-doctor with ruby-lsp command #2310

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented Jul 15, 2024

Motivation

Improve discoverability of the troubleshooting tool.

Partially addresses #2296

Implementation

I chose to deprecate rather than fully remove since we have a number of issues mentioning the tool. We can revisit in future and fully remove.

Automated Tests

None

Manual Tests

  • Run ./exe/ruby-lsp --doctor and verify the checks are performed.
  • Run ./exe/ruby-lsp-doctor and verify it prints a deprecation notice.

@andyw8 andyw8 force-pushed the andyw8/unify-ruby-lsp-doctor branch from ea164ca to 6fb9a8e Compare July 15, 2024 17:01
@@ -36,6 +36,10 @@ parser = OptionParser.new do |opts|
options[:experimental] = true
end

opts.on("--doctor", "Run troubleshooting steps") do
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't add a -d short prefix since it's not something that would be run often, and also to prevent unwanted clashes with other options we may want to add in future.

@@ -107,4 +111,25 @@ if options[:time_index]
return
end

if options[:doctor]
if File.exist?(".index.yml")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copied direct from exe/ruby-lsp-doctor.

@andyw8 andyw8 added enhancement New feature or request server This pull request should be included in the server gem's release notes labels Jul 15, 2024
@andyw8 andyw8 marked this pull request as ready for review July 15, 2024 17:03
@andyw8 andyw8 requested a review from a team as a code owner July 15, 2024 17:03
@andyw8 andyw8 requested review from st0012 and vinistock July 15, 2024 17:03
@andyw8 andyw8 force-pushed the andyw8/unify-ruby-lsp-doctor branch from 6fb9a8e to 8e221d4 Compare July 15, 2024 17:08
puts "indexing: #{indexable.full_path}"
index.index_single(indexable)
end
puts "The ruby-lsp-doctor command is deprecated. Please run `ruby-lsp --doctor` instead."
Copy link
Member

Choose a reason for hiding this comment

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

I vote for getting rid of this file. It's just used for troubleshooting anyway, it's not going to be super disruptive for users.

Let's just ensure it's not referenced in any docs or instructions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Any strong opinion @st0012 ?

Copy link
Member

Choose a reason for hiding this comment

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

Yeah let's remove it 👍 Remember to update gemspec too.

@andyw8
Copy link
Contributor Author

andyw8 commented Jul 15, 2024

I've added a note to some recent issues to point out the new name.

@andyw8 andyw8 merged commit cbb0f01 into main Jul 15, 2024
33 checks passed
@andyw8 andyw8 deleted the andyw8/unify-ruby-lsp-doctor branch July 15, 2024 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request 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.

3 participants