Solargraph: Error on autocomplete of some variables

Created on 6 Apr 2018  路  5Comments  路  Source: castwide/solargraph

First of all, thanks a lot for the extension! It helps a lot :)

I've been having some errors recently, since the latest release, when typing variables names. I see this in the output:

[Error - 19:34:24] Request completionItem/resolve failed.
  Message: undefined method `empty?' for nil:NilClass
  Code: -32603 
[Error - 19:34:24] Request completionItem/resolve failed.
  Message: undefined method `empty?' for nil:NilClass
  Code: -32603 
[Error - 19:35:30] Request completionItem/resolve failed.
  Message: undefined method `empty?' for nil:NilClass
  Code: -32603 
[Error - 19:35:31] Request completionItem/resolve failed.
  Message: undefined method `empty?' for nil:NilClass
  Code: -32603 
[Error - 19:35:31] Request completionItem/resolve failed.
  Message: undefined method `empty?' for nil:NilClass
  Code: -32603 

I still couldn't figure out a small ruby file to reproduce the issue, but it happen inside a file in a big rails app. As soon as I find out how to reproduce with pure ruby I'll update the issue.

Most helpful comment

Gem version 0.18.2 is published. It should resolve the error in both completionItem/resolve and textDocument/hover.

All 5 comments

Thanks!

I believe this error is fixed in the master branch. It's related to the detection of variable assignment values. It affects a lot of code, so I've fast-tracked the fix for version 0.18.2.

captura de pantalla 2018-04-06 a las 19 15 13

In this case, when i hover str VS console output opens unexpectedly. I hope this can help you.

Great gem btw 馃憤

Gem version 0.18.2 is published. It should resolve the error in both completionItem/resolve and textDocument/hover.

Apparently is working now, any further unexpected behavior (if any) will be issued.

Thanks for being so fast, awesome work! :octocat:

Well, as this specific error doesn't happen anymore I'll close this issue. Thanks!

Was this page helpful?
0 / 5 - 0 ratings