Skip to content

typeprof fails #4893

@costa

Description

@costa

Thank you for the bug report

  • I am using the latest version of lsp-mode related packages.
  • I checked FAQ and Troubleshooting sections
  • You may also try reproduce the issue using clean environment using the following command: M-x lsp-start-plain

Bug description

From syl20bnr/spacemacs#17145 (comment)

---undefined method 'map' for nil (NoMethodError)
---
---      folders = @params[:workspaceFolders].map do |folder|
---                                          ^^^^
/opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/messages.rb:58:in 'TypeProf::LSP::Message::Initialize#run': undefined method 'map' for nil (NoMethodError)

      folders = @params[:workspaceFolders].map do |folder|
                                          ^^^^
	from /opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/server.rb:113:in 'block in TypeProf::LSP::Server#run'
	from /opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/server.rb:181:in 'TypeProf::LSP::Reader#read'
	from /opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/server.rb:106:in 'TypeProf::LSP::Server#run'
	from /opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/lsp/server.rb:18:in 'TypeProf::LSP::Server.start_stdio'
	from /opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/cli/cli.rb:115:in 'TypeProf::CLI::CLI#run_lsp'
	from /opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/lib/typeprof/cli/cli.rb:107:in 'TypeProf::CLI::CLI#run'
	from /opt/homebrew/Cellar/ruby/3.4.6/lib/ruby/gems/3.4.0/gems/typeprof-0.30.1/bin/typeprof:5:in '<top (required)>'
	from /opt/homebrew/opt/ruby/bin/typeprof:25:in 'Kernel#load'
	from /opt/homebrew/opt/ruby/bin/typeprof:25:in '<main>'

Process typeprof-ls stderr finished

Steps to reproduce

Install Emacs, Spacemacs, Ruby layer, open any Ruby file.

Expected behavior

No error.

Which Language Server did you use?

typeprof-ls apparently

OS

MacOS

Error callstack

above

Anything else?

You tell me, I'm ready to co-operate, thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions