-
Notifications
You must be signed in to change notification settings - Fork 174
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
Conversation
ea164ca
to
6fb9a8e
Compare
@@ -36,6 +36,10 @@ parser = OptionParser.new do |opts| | |||
options[:experimental] = true | |||
end | |||
|
|||
opts.on("--doctor", "Run troubleshooting steps") do |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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
.
6fb9a8e
to
8e221d4
Compare
exe/ruby-lsp-doctor
Outdated
puts "indexing: #{indexable.full_path}" | ||
index.index_single(indexable) | ||
end | ||
puts "The ruby-lsp-doctor command is deprecated. Please run `ruby-lsp --doctor` instead." |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any strong opinion @st0012 ?
There was a problem hiding this comment.
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.
8e221d4
to
3d38c69
Compare
I've added a note to some recent issues to point out the new name. |
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
./exe/ruby-lsp --doctor
and verify the checks are performed../exe/ruby-lsp-doctor
and verify it prints a deprecation notice.