Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Tests for version 0.21.8 are failing in ruby 3.2.2 with rbs 2.8.2

オープン
#157 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
ruby
領域
testing-qa

調査の方向性

まず失敗しているテストスイートを実行し、test/typeprof/smoke_test.rb、特に smoke/integer.rb の期待値を読んでください。次に typeprof.gemspec と参照されている互換性変更を調べ、サポート対象の rbs の範囲を変更すべきか、テストの動作を変更すべきかを判断してください。宣言された rbs サポートでスイートがパスし、最小バージョンに関する判断が一貫して反映されていれば完了です。

索引モデルが issue の本文から書いたものです。

説明

When running the tests for this gem I get the following error:

(none):1: warning: possibly useless use of a literal in void context
Loaded suite /usr/lib/ruby/gems/3.2.0/gems/rake-13.0.6/lib/rake/rake_test_loader
Started
....Initialized empty Git repository in /build/ruby-typeprof/src/typeprof-0.21.8/testbed/diff-lcs/.git/
From https://github.com/mame/diff-lcs
 * branch            de838d2df80514adbf22c26daed728ddd06af60b -> FETCH_HEAD
.(none):25: warning: possibly useless use of a constant in void context
path/to/file:25: warning: possibly useless use of a constant in void context
....TypeProf for IDE is started successfully
......................................................................
...............................................................................
............F
===============================================================================
Failure: test: smoke/integer.rb(TypeProf::SmokeTest)
/build/ruby-typeprof/src/typeprof-0.21.8/test/typeprof/smoke_test.rb:36:in `block (2 levels) in <class:SmokeTest>'
     33:           expected = actual
     34:         end
     35:
  => 36:         assert_equal(expected, actual)
     37:       end
     38:     end
     39:   end
<"# Classes\n" +
"class Object\n" +
"  private\n" +
"  def foo: (Integer? x) -> nil\n" +
"end\n"> expected but was
<"# Classes\n" +
"class Object\n" +
"  private\n" +
"  def foo: (Integer x) -> nil\n" +
"end\n">

diff:
  # Classes
  class Object
    private
?   def foo: (Integer? x) -> nil
  end
===============================================================================
...............................................................................
....................................................................
Finished in 43.381750919 seconds.
-------------------------------------------------------------------------------
318 tests, 361 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
99.6855% passed
-------------------------------------------------------------------------------
7.33 tests/s, 8.32 assertions/s
rake aborted!
Command failed with status (1)

Tasks: TOP => test
(See full trace by running task with --trace)

This seems to be a regression from https://github.com/ruby/typeprof/commit/30a334ee36d843e549c9f2bc0df0daeec18f2cd1 which is designed to make the tests compatible to rbs 3.2.0. This seems to make the tests only support rbs >= 3.2.0, but the gemspec file stills says rbs >= 1.8.1 is required and supported: https://github.com/ruby/typeprof/blob/v0.21.8/typeprof.gemspec#L33

So I guess either the test needs to be updated to somehow support all the rbs versions, or the gem needs to update its requirements for the minimal required version of rbs.

主要言語
Ruby
スター
833
フォーク
99
平均マージ
9時間 30分
マージ済み PR(30日)
12

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ruby/typeprof のほかの issue

ruby/typeprof の issue をすべて見る

似ている issue

Ruby の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。