Test failure with `make test-bundled-gems`

未关闭
#2,062 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
ruby
领域
testing

调研方向

首先运行 make test-bundled-gems,并检查 test/stdlib/Regexp_test.rb 中失败的 test_compile、test_linear_time? 和 test_new 测试用例。通过 gems/src/rbs/lib/rbs/unit_test/spy.rb 以及相关的类型断言辅助函数,跟踪报告中的调用。完成的标准是,报告中的 Regexp 测试不再引发缺少 inspect 的错误。

由索引模型根据 Issue 内容生成。

描述

I randomly got the following test failures in recent days. I'm not sure why caused these failures with Ruby core and rbs changes.

Error: test_compile(RegexpSingletonTest): NoMethodError: undefined method 'inspect' for an instance of RBS::UnitTest::Convertibles::ToInt
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp#initialize'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp.compile'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'block (2 levels) in wrapped_object'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/Regexp_test.rb:51:in 'block (2 levels) in RegexpSingletonTest#test_compile'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:49:in 'RBS::UnitTest::WithAliases#with_int'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'Enumerator#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'RBS::UnitTest::WithAliases::WithEnum#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:30:in 'RBS::UnitTest::WithAliases::WithEnum#and'
test/stdlib/Regexp_test.rb:50:in 'block in RegexpSingletonTest#test_compile'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:60:in 'RBS::UnitTest::WithAliases#with_string'
test/stdlib/Regexp_test.rb:46:in 'RegexpSingletonTest#test_compile'
Error: test_linear_time?(RegexpSingletonTest): NoMethodError: undefined method 'inspect' for an instance of RBS::UnitTest::Convertibles::ToInt
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp.linear_time?'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'block (2 levels) in wrapped_object'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/Regexp_test.rb:122:in 'block (2 levels) in RegexpSingletonTest#test_linear_time?'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:49:in 'RBS::UnitTest::WithAliases#with_int'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'Enumerator#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'RBS::UnitTest::WithAliases::WithEnum#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:30:in 'RBS::UnitTest::WithAliases::WithEnum#and'
test/stdlib/Regexp_test.rb:121:in 'block in RegexpSingletonTest#test_linear_time?'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:60:in 'RBS::UnitTest::WithAliases#with_string'
test/stdlib/Regexp_test.rb:112:in 'RegexpSingletonTest#test_linear_time?'
Error: test_new(RegexpSingletonTest): NoMethodError: undefined method 'inspect' for an instance of RBS::UnitTest::Convertibles::ToInt
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Regexp#initialize'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'Class#new'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/spy.rb:92:in 'block (2 levels) in wrapped_object'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:152:in 'block in RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'Kernel#catch'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:150:in 'RBS::UnitTest::TypeAssertions#send_setup'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/type_assertions.rb:172:in 'RBS::UnitTest::TypeAssertions#assert_send_type'
test/stdlib/Regexp_test.rb:233:in 'block (2 levels) in RegexpSingletonTest#test_new'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:49:in 'RBS::UnitTest::WithAliases#with_int'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'Enumerator#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:13:in 'RBS::UnitTest::WithAliases::WithEnum#each'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:30:in 'RBS::UnitTest::WithAliases::WithEnum#and'
test/stdlib/Regexp_test.rb:232:in 'block in RegexpSingletonTest#test_new'
/Users/hsbt/Documents/github.com/ruby/ruby/gems/src/rbs/lib/rbs/unit_test/with_aliases.rb:60:in 'RBS::UnitTest::WithAliases#with_string'
test/stdlib/Regexp_test.rb:228:in 'RegexpSingletonTest#test_new'
主要语言
Ruby
星标
2.2k
派生
263
平均合并
1 天 20 小时
30 天内合并 PR
64

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ruby/rbs 的其他 Issue

查看 ruby/rbs 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。