[Ruby] Ruby 2.7 is now the minimum (dropping Ruby 2.6)#29779
Conversation
|
Happy to see this land one day :) |
There was a problem hiding this comment.
Pull request overview
This PR updates the minimum required Ruby version from 2.6 to 2.7, removing compatibility code for older Ruby versions and updating dependency constraints. Ruby 2.6 reached end-of-life in March 2022, and maintaining support for it has become problematic with modern tooling like Dependabot no longer supporting Ruby 2.x.
Key changes:
- Minimum Ruby version updated to 2.7.0 across gemspec files, version checks, and RuboCop configuration
- Simplified YAML.safe_load and ERB.new calls by removing Ruby 2.5/2.6 compatibility branches
- Updated dependency constraints to remove Ruby 2.6-specific version pins for fakefs, ox, and domain_name
Reviewed changes
Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| bin/fastlane | Updated Ruby version check from 2.0.0 to 2.7.0 minimum |
| fastlane.gemspec | Updated required_ruby_version to >= 2.7 and adjusted google-cloud-env constraint |
| fastlane/lib/fastlane/plugins/template/%gem_name%.gemspec.erb | Updated template's required_ruby_version to >= 2.7 |
| fastlane/lib/fastlane/erb_template_helper.rb | Removed Ruby 2.6 compatibility branch for ERB.new, using keyword arguments only |
| spaceship/lib/spaceship/spaceauth_runner.rb | Removed Ruby 2.5 compatibility branch for YAML.safe_load, using keyword arguments only |
| Rakefile | Updated YAML.safe_load call to use keyword arguments with aliases parameter |
| Gemfile | Removed Ruby 2.6 constraint comments and version pins for fakefs, ox, and domain_name |
| Gemfile.lock | Reflects updated dependencies after removing Ruby 2.6 constraints |
| .rubocop.yml | Updated TargetRubyVersion from 2.6 to 2.7 |
| .circleci/config.yml | Removed Ubuntu Ruby 2.6 test job from CI workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
The reason we kept 2.6 is because is comes by default on Mac. 2.7, 3.0 and 3.1 are already deprecated. And if we force people to upgrade, should we just ask them to use at least 3.2? |
|
How do you feel about like updating docs saying 3.2+ preferred, anything else is deprecated. We cut one more release with 2.6 support, then do dropping of 2.7, 3.0, and 3.1. We'd be following supported Ruby versions at that point and once you bite bullet of 2.6 (pre-installed) - the rest are easier to drop. |
|
Best to do it staged, yes. We can also prepare the drop of everything below 3.3 by end of March when 3.2 is dropped. That gives people ample time to get ready. We could even make it a warning message displayed in fastlane for those who regularly update fastlane, they would be the ones to be affected the most I guess. Maybe display it last in the console, easy to spot. The EOL ruby data seems to be here https://github.com/ruby/www.ruby-lang.org/blob/master/_data/branches.yml |
|
Ah good idea! Let me work a PR to emit a message (with an ENV to disable it) for unsupported Rubys and get some team buy-in on that. |
|
PR up for a new feature to emit a message in output if running an unsupported Ruby version - #29840 |
There was a problem hiding this comment.
Hey @iBotPeaches 👋
Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a month, and your PR will be included in the next one.
Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀"
|
Ran my issue stats script updated for 2025 til now So respectively 5 and 3 issues reported on ruby 2.6 and 2.7 out of 93 issues. Few active reporters whose issues had the ruby version are using ruby 3.0 and 3.1 either. 76 / 93 using 3.2 or later. |
There was a problem hiding this comment.
Congratulations! 🎉 This was released as part of fastlane 2.232.0 🚀
Motivation and Context
Ruby 2.6 has been end-of-lifed 3 years and 8 months ago on March 31, 2022.
Testing has been broken against Ruby 2.6 / Ruby 2.7 for awhile, but is being restored in #29777. We are facing deprecations on a variety of dependencies and supporting an almost 4 year old version of Ruby is painful.
Spawned from previous work of @lacostej on #21685
Description
closes: #21685