Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#157 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
ruby
Lĩnh vực
testing-qa

Hướng nghiên cứu

Bắt đầu bằng cách chạy bộ kiểm thử đang thất bại và đọc test/typeprof/smoke_test.rb, đặc biệt là expectation trong smoke/integer.rb. Sau đó kiểm tra typeprof.gemspec và thay đổi tương thích được tham chiếu để xác định xem phạm vi rbs được hỗ trợ hay hành vi của bài kiểm thử nên thay đổi. Hoàn tất nghĩa là bộ kiểm thử chạy thành công với hỗ trợ rbs đã khai báo, và quyết định về phiên bản tối thiểu được phản ánh nhất quán.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Ruby
Star
833
Fork
99
Merge trung bình
9 giờ 30 phút
Pull request đã merge (30 ngày)
12

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của ruby/typeprof

Tất cả issue của ruby/typeprof

Issue tương tự

Thêm issue về Ruby

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.