-
Notifications
You must be signed in to change notification settings - Fork 95
Open
Description
Environment
- typeprof: 0.31.1
- vscode-typeprof: 0.30.0
- Ruby: 4.0.0
- Bundler: 4.0.3
- VSCode: 1.108.2 (Universal)
Reproduction steps
Starting from an empty directory:
bundle init
bundle add typeprof
mkdir lib
bundle exec typeprof --init
echo -e "#: (b: untyped) -> nil\ndef a(b:); end" > lib/a.rb
Then:
- Open the directory in VSCode (or Run
Developer: Reload Window) - Open lib/a.rb in the editor
VSCode shows:
The Ruby TypeProf server crashed 5 times in the last 3 minutes. The server will not be restarted.
Minimal code
#: (b: untyped) -> nil
def a(b:); end
Backtrace
Details
[Info - 16:44:34] /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:153:in 'block (2 levels) in TypeProf::Core::AST::Node#diff': undefined method 'diff' for an instance of Array (NoMethodError)
[Info - 16:44:34]
[Info - 16:44:34] subnode0.diff(prev_subnode0)
[Info - 16:44:34] ^^^^^
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:150:in 'Hash#each'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:150:in 'Enumerable#zip'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:150:in 'block in TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:145:in 'Hash#each'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:145:in 'TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:153:in 'block (2 levels) in TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:150:in 'Array#zip'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:150:in 'block in TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:145:in 'Hash#each'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:145:in 'TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/misc.rb:58:in 'TypeProf::Core::AST::StatementsNode#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:153:in 'block (2 levels) in TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:150:in 'Array#zip'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:150:in 'block in TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:145:in 'Hash#each'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/ast/base.rb:145:in 'TypeProf::Core::AST::Node#diff'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/service.rb:64:in 'TypeProf::Core::Service#update_rb_file'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/core/service.rb:53:in 'TypeProf::Core::Service#update_file'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:147:in 'block in TypeProf::LSP::Server#update_file'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:131:in 'block in TypeProf::LSP::Server#each_core'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:129:in 'Hash#each'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:129:in 'TypeProf::LSP::Server#each_core'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:146:in 'TypeProf::LSP::Server#update_file'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/messages.rb:139:in 'TypeProf::LSP::Message::TextDocument::DidOpen#run'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:203:in 'block in TypeProf::LSP::Server#run'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:274:in 'TypeProf::LSP::Reader#read'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:196:in 'TypeProf::LSP::Server#run'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:41:in 'block (2 levels) in TypeProf::LSP::Server.start_socket'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/socket.rb:1268:in 'block (2 levels) in Socket.accept_loop'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/socket.rb:1265:in 'Array#each'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/socket.rb:1265:in 'block in Socket.accept_loop'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/socket.rb:1263:in 'Kernel#loop'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/socket.rb:1263:in 'Socket.accept_loop'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:36:in 'block in TypeProf::LSP::Server.start_socket'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/socket.rb:1240:in 'Socket.tcp_server_sockets'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/lsp/server.rb:25:in 'TypeProf::LSP::Server.start_socket'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/cli/cli.rb:123:in 'TypeProf::CLI::CLI#run_lsp'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/lib/typeprof/cli/cli.rb:113:in 'TypeProf::CLI::CLI#run'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/typeprof-0.31.1/bin/typeprof:5:in '<top (required)>'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/rubygems.rb:303:in 'Kernel#load'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/bin/typeprof:25:in '<top (required)>'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/cli/exec.rb:61:in 'Kernel.load'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/cli/exec.rb:61:in 'Bundler::CLI::Exec#kernel_load'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/cli/exec.rb:24:in 'Bundler::CLI::Exec#run'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/cli.rb:500:in 'Bundler::CLI#exec'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/vendor/thor/lib/thor/command.rb:28:in 'Bundler::Thor::Command#run'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in 'Bundler::Thor::Invocation#invoke_command'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/vendor/thor/lib/thor.rb:538:in 'Bundler::Thor.dispatch'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/cli.rb:35:in 'Bundler::CLI.dispatch'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/vendor/thor/lib/thor/base.rb:584:in 'Bundler::Thor::Base::ClassMethods#start'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/cli.rb:29:in 'Bundler::CLI.start'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/exe/bundle:28:in 'block in <top (required)>'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/bundler/friendly_errors.rb:118:in 'Bundler.with_friendly_errors'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/gems/4.0.0/gems/bundler-4.0.3/exe/bundle:20:in '<top (required)>'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/rubygems.rb:303:in 'Kernel#load'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/lib/ruby/4.0.0/rubygems.rb:303:in 'Gem.activate_and_load_bin_path'
[Info - 16:44:34] from /Users/kozy4324/.rbenv/versions/4.0.0/bin/bundle:25:in '<main>'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels