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

Overly sensitive to startup? #36

Open
kwerle opened this issue Oct 20, 2017 · 4 comments
Open

Overly sensitive to startup? #36

kwerle opened this issue Oct 20, 2017 · 4 comments

Comments

@kwerle
Copy link
Contributor

kwerle commented Oct 20, 2017

I sometimes get the following when starting up. It may depend on cursor context & timing.

NoMethodError: undefined method `refs' for nil:NilClass
  /app/lib/language_server/project.rb:15:in `find_definitions'
  /app/lib/language_server/definition_provider/ad_hoc.rb:12:in `call'
  /app/lib/language_server.rb:139:in `each'
  /app/lib/language_server.rb:139:in `flat_map'
  /app/lib/language_server.rb:139:in `block in <module:LanguageServer>'
  /app/lib/language_server.rb:45:in `block in run'
  /usr/local/bundle/gems/language_server-protocol-0.4.0/lib/language_server/protocol/transport/stdio/reader.rb:27:in `read'
  /app/lib/language_server.rb:34:in `run'
  exe/language_server-ruby:8:in `<top (required)>'
@mtsmfm
Copy link
Owner

mtsmfm commented Oct 21, 2017

Could you give me the project which you opened?

@kwerle
Copy link
Contributor Author

kwerle commented Oct 21, 2017 via email

@ggilmore
Copy link

ggilmore commented Apr 5, 2018

I can reproduce this inside this repository.

I tried to go to definition with result on line 70 in this file. I expected it to take me to the declaration right above it, but instead I see this stack-trace:

/usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/lib/language_server/project.rb:15:in `find_definitions': undefined method `refs' for nil:NilClass (NoMethodError)
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/lib/language_server/definition_provider/ad_hoc.rb:12:in `call'
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/lib/language_server.rb:157:in `each'
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/lib/language_server.rb:157:in `flat_map'
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/lib/language_server.rb:157:in `block in <module:LanguageServer>'
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/lib/language_server.rb:47:in `block in run'
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-protocol-0.5.0/lib/language_server/protocol/transport/stdio/reader.rb:27:in `read'
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/lib/language_server.rb:38:in `run'
	from /usr/local/lib/ruby/gems/2.5.0/gems/language_server-0.11.0/exe/language_server-ruby:30:in `<top (required)>'
	from /usr/local/bin/language_server-ruby:23:in `load'
	from /usr/local/bin/language_server-ruby:23:in `<main>'

Note that I didn't edit the the file before sending the definition request.

@kwerle
Copy link
Contributor Author

kwerle commented Apr 5, 2018

@ggilmore
I've bailed and started https://github.com/kwerle/ruby_language_server - which I use with Atom. If you are interested in helping I'd be happy to do some vscode integration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants