typeprof-0.21.11 + rbs-3.6.0 raise NoMethodError
まだ誰も着手していません。
評価
調査の方向性
Ruby 3.3.5、typeprof 0.21.11、rbs 3.6.0で失敗を再現し、その後、451行目付近のconv_blockにあるlib/typeprof/import.rbを調査します。互換性の問題を解決した後、typeprof /dev/nullがNoMethodErrorなしで完了することを確認します。
索引モデルが issue の本文から書いたものです。
説明
How to reproduce:
% docker run --rm -it ruby:3.3.5 /bin/bash
root@5086137b08f0:/# gem i typeprof:0.21.11
Fetching typeprof-0.21.11.gem
Successfully installed typeprof-0.21.11
1 gem installed
A new release of RubyGems is available: 3.5.16 → 3.5.20!
Run `gem update --system 3.5.20` to update your installation.
root@5086137b08f0:/# typeprof --version
typeprof 0.21.11
root@5086137b08f0:/# typeprof /dev/null
# TypeProf 0.21.11
# Classes
root@5086137b08f0:/# gem update rbs
Updating installed gems
Updating rbs
Fetching rbs-3.6.0.gem
Building native extensions. This could take a while...
Successfully installed rbs-3.6.0
Gems updated: rbs
root@5086137b08f0:/# typeprof /dev/null
/usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:451:in `conv_block': undefined method `required_positionals' for an instance of RBS::Types::UntypedFunction (NoMethodError)
lead_tys = blk.required_positionals.map {|type| conv_type(type.type) }
^^^^^^^^^^^^^^^^^^^^^
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:405:in `conv_func'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:396:in `block in conv_method_def'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:395:in `map'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:395:in `conv_method_def'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:216:in `block (3 levels) in conv_classes'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:199:in `each'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:199:in `block (2 levels) in conv_classes'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:189:in `each'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:189:in `block in conv_classes'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:349:in `each_class_decl'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:171:in `conv_classes'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:135:in `dump_json'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:123:in `load_rbs'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:42:in `get_builtin_env'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/import.rb:17:in `initialize'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/analyzer.rb:306:in `new'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/analyzer.rb:306:in `initialize'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/config.rb:89:in `new'
from /usr/local/bundle/gems/typeprof-0.21.11/lib/typeprof/config.rb:89:in `analyze'
from /usr/local/bundle/gems/typeprof-0.21.11/exe/typeprof:9:in `<top (required)>'
from /usr/local/bundle/bin/typeprof:25:in `load'
from /usr/local/bundle/bin/typeprof:25:in `<main>'
- 主要言語
- Ruby
- スター
- 833
- フォーク
- 99
- 平均マージ
- 9時間 30分
- マージ済み PR(30日)
- 12
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
ruby/typeprof のほかの issue
-
難易度 5/5 1週間以上 初心者へのやさしさ 28/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
palladius/rails8-app-on-gcp#145 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
rubocop/rubocop-rspec#2236 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
riscv/riscv-unified-db#2624 · リアクション 1 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100