-
Notifications
You must be signed in to change notification settings - Fork 30
Change how we warn about server not running #88
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
Change how we warn about server not running #88
Conversation
@@ -13,8 +13,6 @@ | |||
require "ruby_lsp/internal" | |||
require "ruby_lsp/ruby_lsp_rails/extension" | |||
|
|||
$VERBOSE = nil unless ENV["VERBOSE"] || ENV["CI"] |
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.
This was added to reduce noise in test outout, but it was preventing us from asserting against stderr.
@@ -22,23 +22,6 @@ class RailsClientTest < ActiveSupport::TestCase | |||
assert_equal(expected_response, RailsClient.instance.model("User")) | |||
end | |||
|
|||
test "raises during instantiation if app_uri file doesn't exist" 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.
No longer relevant since we don't do anything during instantiation.
@@ -13,7 +13,6 @@ class Extension < ::RubyLsp::Extension | |||
|
|||
sig { override.void } | |||
def activate | |||
# Must be the last statement in activate since it raises to display a notification for the user |
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.
No longer relevant since we don't raise.
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.
Nice! I think this will be a much better experience.
There are legitimate cases why someone may want to edit code without the server running, so we want to avoid over-notifying. In this PR, we are changing the behaviour so that we output a notice in the logs, rather than showing an error dialog.
We should also update the README to explain how some features only available if the server is running, but since there is only currently one feature (Hover), it probably makes more sense to do that after Code Lens is added in #67.
Paired on with @vinistock