Skip to content

Specs: Use latest timecop v0.9.4, to fix ruby-head #914

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

Merged
merged 1 commit into from
Sep 20, 2021

Conversation

olleolleolle
Copy link
Contributor

@olleolleolle olleolleolle commented Jun 17, 2021

This PR asks for a Timecop with a non-exact version, 0.9, which resolves to 0.9.4. That version supports Ruby 3.1 aka ruby-head. Timecop changelog.

Background

Last commit to that line in the Gemfile was 6 years ago, with exact versions everywhere. 4cfd9c7

Result

With this version of timecop, concurrent-ruby is green 🟢 on ruby-head.


/home/runner/.rubies/ruby-head/bin/ruby -I/home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/lib:/home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-support-3.10.2/lib /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb --color --backtrace --order defined --format documentation --tag ~notravis
<internal:timev>:301:in `initialize': no implicit conversion of Hash into Integer (TypeError)
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/timecop-0.7.4/lib/timecop/time_extensions.rb:22:in `new'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/timecop-0.7.4/lib/timecop/time_extensions.rb:22:in `new_with_mock_time'
	from <internal:timev>:219:in `now'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:89:in `start'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/lib/rspec/core/reporter.rb:72:in `report'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:115:in `run_specs'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:89:in `run'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:71:in `run'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/lib/rspec/core/runner.rb:45:in `invoke'
	from /home/runner/work/concurrent-ruby/concurrent-ruby/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.10.1/exe/rspec:4:in `<main>'

This was in one of the GitHub Actions results: https://github.com/ruby-concurrency/concurrent-ruby/runs/2848609176#step:4:94

@olleolleolle
Copy link
Contributor Author

olleolleolle commented Jun 17, 2021

@pitr-ch 👋 I think I made one of the matrix elements pass! At what cost? We'll learn.

Update I took a look around, and could not find any obviously-broken details connected to Timecop changes.

@olleolleolle olleolleolle changed the title Update timecop to latest release Specs: Update timecop to latest release, to fix ruby-head Jun 17, 2021
@olleolleolle olleolleolle changed the title Specs: Update timecop to latest release, to fix ruby-head Specs: Use latest timecop v0.9.4, to fix ruby-head Jun 17, 2021
@chrisseaton
Copy link
Member

Can you please rebase?

This sets it to a non-exact version.
@olleolleolle
Copy link
Contributor Author

@chrisseaton 🟢 Rebased!

@chrisseaton chrisseaton self-requested a review September 20, 2021 15:03
@chrisseaton chrisseaton merged commit 196e92a into ruby-concurrency:master Sep 20, 2021
@chrisseaton
Copy link
Member

Thanks for your fix.

@olleolleolle olleolleolle deleted the timecop-latest branch September 20, 2021 15:05
@olleolleolle
Copy link
Contributor Author

Does this make any of the experimentals less experimental?

@chrisseaton
Copy link
Member

Which experimental Ruby versions?

I need to try to get a grip on what Ruby versions we officially claim to support and document it and reflect it in CI.

@olleolleolle
Copy link
Contributor Author

olleolleolle commented Sep 20, 2021

@chrisseaton There are 2 workflows in CI, one being scheduled to run at midnight, and targets [head, truffleruby, truffleruby-head].

The regular ci.yml one includes 2.4 and up, including latest ruby: [2.4, 2.5, 2.6, 2.7, 3.0, jruby, jruby-head].

The gemspec requires a Ruby 1.9.3+...

(Sorry, these are just random facts, which do not contribute to making an understanding of what you mentioned.)

Counter-note: I was running around in the codebase looking for opportunities to use __dir__, but that's 2.0. Now, there are hits for __dir__ in the code-base, in the tests. It has been backported: so, still 1.9.3

Rakefile
8:    def __dir__

@olleolleolle
Copy link
Contributor Author

The "Supported Ruby Versions" section claims 2.0+ - so we could go to use __dir__, I guess.

https://github.com/ruby-concurrency/concurrent-ruby#supported-ruby-versions

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

Successfully merging this pull request may close these issues.

2 participants