Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

require ruby version in gemspec #35

Merged
merged 1 commit into from
Jul 2, 2023
Merged

require ruby version in gemspec #35

merged 1 commit into from
Jul 2, 2023

Conversation

jjb
Copy link
Contributor

@jjb jjb commented Jul 2, 2023

I believe because of the reference to the Fiber class, the minimum ruby version is 2.5

The suite only starts at 3.0, so maybe that's the more official/implied required version to use?

@hsbt hsbt merged commit d5eb74f into ruby:master Jul 2, 2023
12 checks passed
@jjb jjb deleted the patch-1 branch July 2, 2023 22:52
@eregon
Copy link
Member

eregon commented Jul 3, 2023

I believe because of the reference to the Fiber class, the minimum ruby version is 2.5

Fiber existed before 2.5, what do you mean?

$ ruby -ve 'p Fiber'
ruby 2.0.0p648 (2015-12-16 revision 53162) [x86_64-linux]
Fiber

@eregon
Copy link
Member

eregon commented Jul 3, 2023

    test-unit-ruby-core was resolved to 1.0.0, which depends on
      ruby (>= 2.6.0)

So effectively it's 2.6.

@eregon
Copy link
Member

eregon commented Jul 3, 2023

Ah, but without the lockfile, with test-unit-ruby-core 1.0.1 it's 2.5: https://rubygems.org/gems/test-unit-ruby-core

@eregon
Copy link
Member

eregon commented Jul 3, 2023

The test suite passes on 2.6, and fails on 2.5:

Your RubyGems version (2.7.6.3) has a bug that prevents `required_ruby_version` from working for Bundler. Any scripts that use `gem install bundler` will break as soon as Bundler drops support for your Ruby version. Please upgrade RubyGems to avoid future breakage and silence this warning by running `gem update --system 3.2.3`
/home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/test-unit-ruby-core-1.0.1/lib/core_assertions.rb:746: warning: shadowing outer local variable - clk
/home/eregon/code/timeout/lib/timeout.rb:114: warning: shadowing outer local variable - req
Loaded suite /home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/rake-13.0.6/lib/rake/rake_test_loader
Started
F
==============================================================================================================================
Failure: test_handling_enclosed_threadgroup(TestTimeout):
  assert_separately failed with error message
  pid 81796 exit 0
  | /home/eregon/code/timeout/lib/timeout.rb:114: warning: shadowing outer local variable - req
  | /home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/test-unit-ruby-core-1.0.1/lib/core_assertions.rb:746: warning: shadowing outer local variable - clk
  .
  <false> is not true.
/home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/test-unit-ruby-core-1.0.1/lib/core_assertions.rb:495:in `assert'
/home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/test-unit-ruby-core-1.0.1/lib/core_assertions.rb:319:in `assert_separately'
/home/eregon/code/timeout/test/test_timeout.rb:212:in `test_handling_enclosed_threadgroup'
     209: 
     210:   # https://github.com/ruby/timeout/issues/24
     211:   def test_handling_enclosed_threadgroup
  => 212:     assert_separately(%w[-rtimeout], <<-'end;')
     213:       Thread.new {
     214:         t = Thread.current
     215:         group = ThreadGroup.new
==============================================================================================================================
F
==============================================================================================================================
Failure: test_threadgroup(TestTimeout):
  assert_separately failed with error message
  pid 81802 exit 0
  | /home/eregon/code/timeout/lib/timeout.rb:114: warning: shadowing outer local variable - req
  | /home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/test-unit-ruby-core-1.0.1/lib/core_assertions.rb:746: warning: shadowing outer local variable - clk
  .
  <false> is not true.
/home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/test-unit-ruby-core-1.0.1/lib/core_assertions.rb:495:in `assert'
/home/eregon/code/timeout/vendor/bundle/ruby/2.5.0/gems/test-unit-ruby-core-1.0.1/lib/core_assertions.rb:319:in `assert_separately'
/home/eregon/code/timeout/test/test_timeout.rb:199:in `test_threadgroup'
     196:   end
     197: 
     198:   def test_threadgroup
  => 199:     assert_separately(%w[-rtimeout], <<-'end;')
     200:       tg = ThreadGroup.new
     201:       thr = Thread.new do
     202:         tg.add(Thread.current)
==============================================================================================================================
Finished in 0.774805928 seconds.
------------------------------------------------------------------------------------------------------------------------------
20 tests, 35 assertions, 2 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
90% passed
------------------------------------------------------------------------------------------------------------------------------
25.81 tests/s, 45.17 assertions/s

So I'll add 2.6 in CI and require 2.6 minimum.

eregon added a commit to eregon/timeout that referenced this pull request Jul 3, 2023
* The test suite fails on 2.5.
* See ruby#35
eregon added a commit that referenced this pull request Jul 3, 2023
* The test suite fails on 2.5.
* See #35
matzbot pushed a commit to ruby/ruby that referenced this pull request Jul 3, 2023
@jjb
Copy link
Contributor Author

jjb commented Jul 3, 2023

thanks for checking - whoops, i had quickly checked when fibers were introduced and I guess I was mistaken

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants