-
Notifications
You must be signed in to change notification settings - Fork 9
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
Support Ruby 3.2.2 #492
Support Ruby 3.2.2 #492
Conversation
b753cd8
to
2f259e1
Compare
c7c0679
to
d394629
Compare
9ac6628
to
0ccdec5
Compare
0ccdec5
to
35ad9f3
Compare
matrix: | ||
setup: | ||
ruby: | ||
- 2.7.4 | ||
- 3.2.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👌
@@ -6,6 +6,7 @@ require: | |||
# Enable new cops when we update rubocop to a newer version | |||
AllCops: | |||
NewCops: enable | |||
TargetRubyVersion: 2.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make rubocop enforce Ruby 3 rules right away? 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means we'll have to change the code to use Ruby 3 syntax or API to address the new rubocop issues. I don't think we should use Ruby 3 right now, because the apps are still using 2.7. Once a new release-toolkit is released (which contains all the fixes for the Ruby 3 compatibility), I'll try to upgrade a few apps to use Ruby 3. If all go well, we can then changing this library to require Ruby 3 and above. That's when we can drop 2.7 and let rubocop enforce Ruby 3 rules.
The "build-and-test" status check shows as "Pending" because it's replaced by two "build and test" jobs. I'll merge this PR now and will update the branch protection rule to use the two new build-and-test status checks. |
What does it do?
Ruby 3.2.2 support has been addressed in previous PRs (#493, #497, and #504). This PR updates the CI checks to ensure this library continues to be compatible with Ruby 3.2.2.
The "required ruby version" settings in the gemspec file stays unchanged—the library should stay compatible with 2.7.4.
I have updated the "Build and Test" CI step to run with both Ruby 3.2.2 and 2.7.4. Since there are no ruby source code changes in this PR, tests using Ruby 2.7.4 all passed as expected. However, there are some test failures when using Ruby 3.2.2. I'll look into those later.
I have also configured the rubocop to use 2.7 as the oldest Ruby version, so that it won't report issues like "please use this new Ruby syntax and API".
Checklist before requesting a review
bundle exec rubocop
to test for code style violations and recommendationsspecs/*_spec.rb
) if applicablebundle exec rspec
to run the whole test suite and ensure all your tests passCHANGELOG.md
file to describe your changes under the appropriate existing###
subsection of the existing## Trunk
section.MIGRATION.md
file to describe how the changes will affect the migration from the previous major version and what the clients will need to change and consider.