Skip to content

Modernize CI with Ruby 4.0, removing Rails 6.1 and 7.0, Ruby 3.0 and 3.1#1125

Merged
texpert merged 11 commits intoowen2345:masterfrom
texpert:add-ruby-4-to-the-ci
Mar 8, 2026
Merged

Modernize CI with Ruby 4.0, removing Rails 6.1 and 7.0, Ruby 3.0 and 3.1#1125
texpert merged 11 commits intoowen2345:masterfrom
texpert:add-ruby-4-to-the-ci

Conversation

@texpert
Copy link
Copy Markdown
Collaborator

@texpert texpert commented Feb 28, 2026

Changes

  • Remove unnecessary mb_chars call in lib/ext/string.rb - it has been marked as deprecated in Rails 8.1, and will be removed on Rails 8.2,
  • Use non-digest-assets version 2.6.0 on rails_edge.gemfile, as well as on all the gemfiles
  • Change TargetRubyVersion in .rubocop.yml to 3.2, as the currently minimal tested Ruby version
    • The 4.0.x Ruby version is still raw
  • The gemspec Ruby and Rails version constraints are not changed to still allow the gem to be used with older versions, despite not testing these old versions in the CI

texpert and others added 9 commits February 28, 2026 20:14
…on Rails 6.1 and Rails 7.0 - Rails.env.local? has been introduced only in Rails 7.1. We're not testing the gem with 6.1 and 7.0, but don't want yet to hard constraint to 7.1 minimum
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
[skip ci]

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
"The Ruby version values in the matrix are unquoted numbers. YAML parses these as numeric types, and 4.0 can be stringified as 4, which may cause ruby/setup-ruby to try installing the wrong version. Quote the versions (e.g., '3.2', '3.3', '3.4', '4.0') to ensure exact values are passed through."
TargetRubyVersion is set to 3.4, but this repo’s CI matrix still runs specs on Ruby 3.2/3.3. With TargetRubyVersion: 3.4, RuboCop can allow 3.4-only syntax that will still break on 3.2/3.3. Consider setting TargetRubyVersion to the minimum Ruby version you intend to support/test (currently 3.2), or dropping 3.2/3.3 from CI if they’re no longer supported.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Collaborator

@brian-kephart brian-kephart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes @texpert! I suggested a few changes, but this looks good with or without them.

Gemfile Outdated
gem 'rails', '~> 8.0.1'

gem 'non-digest-assets', '2.6.0'
gem 'rails', '~> 8.1'
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version constraint would match 8.2. Since Rails makes breaking changes in minor versions, I would expect ~> 8.1.0 here.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 4e8b267

gemfile: rails_edge
- ruby: head
gemfile: rails_8_0
gemfile: rails_edge
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously I split up the tests for head Ruby and edge Rails so that an incompatibility with unreleased Rails wouldn't prevent us from successfully testing against an unreleased Ruby, and vice versa. I'm not against testing the head/edge combo, but I still prefer that unreleased Ruby should be tested against the latest released Rails as well. It's not big deal to me though.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 064f440

@texpert
Copy link
Copy Markdown
Collaborator Author

texpert commented Mar 8, 2026

Thanks for these changes @texpert! I suggested a few changes, but this looks good with or without them.

Thanks for valuable comments, @brian-kephart! I have addressed them in the last few commits.

Now we're having 3 test suites in the experimental support - I have also left there the testing of ruby head and rails edge combination.

@texpert texpert merged commit a391d2a into owen2345:master Mar 8, 2026
20 checks passed
@texpert texpert deleted the add-ruby-4-to-the-ci branch March 22, 2026 16:37
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