Typeprof failed to start when rbs_collection.lock.yaml doesn't exist.
ono-max opened this issue · 0 comments
ono-max commented
To reproduce this error, you can do such as:
$ tree
.
├── Gemfile
├── Gemfile.lock
├── rbs_collection.yaml
└── target.rb
Here is the log:
[vscode] Try to start TypeProf for IDE
[vscode] typeprof version: typeprof 0.21.4
[vscode] Starting Ruby TypeProf (typeprof 0.21.4)...
[Info - 11:06:55 PM] TypeProf for IDE is started successfully
[vscode] Ruby TypeProf is running
[Info - 11:06:55 PM] bundler: failed to load command: typeprof (/Users/s15236/.rbenv/versions/3.1.0/bin/typeprof)
[Info - 11:06:55 PM] Connection to server got closed. Server will restart.
[Info - 11:06:55 PM] <internal:ast>:67:in `of': Interrupt
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/error_highlight/core_ext.rb:19:in `to_s'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/did_you_mean/core_ext/name_error.rb:15:in `to_s'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:114:in `message'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:114:in `handle_no_method_error?'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:36:in `rescue in run'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:20:in `run'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:48:in `block in <top (required)>'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:36:in `<top (required)>'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/bin/bundle:25:in `load'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/bin/bundle:25:in `<main>'
[Info - 11:06:55 PM] /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/import.rb:10:in `initialize': undefined method `repo_path' for nil:NilClass (NoMethodError)
[Info - 11:06:55 PM]
[Info - 11:06:55 PM] @repo.add(collection_lock.repo_path)
[Info - 11:06:55 PM] ^^^^^^^^^^
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/analyzer.rb:306:in `new'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/analyzer.rb:306:in `initialize'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/config.rb:89:in `new'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/config.rb:89:in `analyze'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:289:in `analyze'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:89:in `initialize'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:567:in `new'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:567:in `run'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:857:in `block in run'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:792:in `read'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:852:in `run'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:32:in `block (2 levels) in start_lsp_server'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/socket.rb:810:in `block (2 levels) in accept_loop'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/socket.rb:807:in `each'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/socket.rb:807:in `block in accept_loop'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/socket.rb:805:in `loop'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/socket.rb:805:in `accept_loop'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:27:in `block in start_lsp_server'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/3.1.0/socket.rb:782:in `tcp_server_sockets'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/lib/typeprof/lsp.rb:16:in `start_lsp_server'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/typeprof-0.21.4/exe/typeprof:7:in `<top (required)>'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/bin/typeprof:25:in `load'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/bin/typeprof:25:in `<top (required)>'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `load'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:58:in `kernel_load'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli/exec.rb:23:in `run'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:483:in `exec'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:31:in `dispatch'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/cli.rb:25:in `start'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:48:in `block in <top (required)>'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/lib/ruby/gems/3.1.0/gems/bundler-2.3.15/exe/bundle:36:in `<top (required)>'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/bin/bundle:25:in `load'
[Info - 11:06:55 PM] from /Users/s15236/.rbenv/versions/3.1.0/bin/bundle:25:in `<main>'