steep icon indicating copy to clipboard operation
steep copied to clipboard

LSP and signature file updates

Open lloeki opened this issue 2 years ago • 1 comments

When working on https://github.com/dense-analysis/ale/pull/4376 I noticed that if I change RBS files (change, addition, deletion) at least some of the changes don't seem to be picked up by the LSP server.

I was wondering whether the definition files are not refreshed, and thus Steep proceeds to check with stale cached signature data.

lloeki avatar Feb 02 '23 14:02 lloeki

Example:

# foo.rb
class Foo
  def test(a)
    puts a
  end
end

Foo.new.test('hello')
# foo.rbs
class Foo
  # def test: (::String) -> void
end

Steps to reproduce:

  • start Steep LSP server
  • failure is reported: foo.rb:7:8: [error] Type ::Foo does not have method test
  • uncomment def in definition
  • LSP server does not update and still reports failure
  • stop then start LSP server
  • failure disappears

lloeki avatar Feb 02 '23 14:02 lloeki