Drop support for Ruby 3.2 and remove dead version guards#1029
Open
mattmenefee wants to merge 1 commit into
Open
Drop support for Ruby 3.2 and remove dead version guards#1029mattmenefee wants to merge 1 commit into
mattmenefee wants to merge 1 commit into
Conversation
133d92c to
131e51e
Compare
4 tasks
131e51e to
fa612d2
Compare
Contributor
|
Thanks @mattmenefee I'm planning this for v9 |
fa612d2 to
c0bdfad
Compare
22b9b6b to
e474147
Compare
Ruby 3.2 reached end-of-life on 2026-04-01 and no longer receives security patches. Continuing to advertise and test against an unsupported runtime provides little value and spends CI on a version no one should run in production. Raise the floor to Ruby 3.3 (currently in security maintenance, EOL expected 2027-03-31): - Bump `required_ruby_version` to `>= 3.3` - Drop `'3.2'` from the CI test matrix (3.3 was already covered) - Raise RuboCop `TargetRubyVersion` to 3.3 - Update the README compatibility statement and CONTRIBUTING prerequisites - Drop the `parser` / `prism` version conditional from the Witchcraft optional-dependency list in the troubleshooting guide, leaving `method_source` and `unparser` (Prism is bundled with Ruby 3.3+ and `parser` is pulled in transitively by `unparser`, so neither needs adding to a Gemfile) With the floor at 3.3, the version-conditional code becomes dead and is removed: - `Chewy::Index::Witchcraft` branched on `RUBY_VERSION >= '3.3'` to pick between Prism (a default gem since Ruby 3.3) and the external `parser` gem. The `parser` fallback in the requires, `check_requirements!` and `ast_from_proc` is now unreachable, so witchcraft always uses Prism (also removing a fragile string version comparison). The Prism requirements check is dropped too: Prism ships with Ruby 3.3+, so it is always present and never needs adding to a Gemfile, and the real `parser` dependency is already covered transitively by the `unparser` check. - `Chewy::LogSubscriber` branched on `ActiveSupport.version >= 7.1`, unconditionally true since the ActiveSupport >= 7.2 floor; the pre-7.1 positional `color` call is removed. This is a breaking change for anyone still on Ruby 3.2; they must upgrade to 3.3+ to use future Chewy releases. Version-anchored docs that describe past releases' requirements (e.g. the Chewy 7 to 8 migration guide) are intentionally left unchanged.
e474147 to
0d8b051
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chewy.gemspec:required_ruby_version>= 3.2→>= 3.3.github/workflows/ruby.yml: drop'3.2'from the test matrix (3.3 was already covered).rubocop.yml:TargetRubyVersion3.2→3.3parser/prismversion conditional from the Witchcraft optional-dependency list, leavingmethod_sourceandunparser(Prism is bundled with Ruby 3.3+ andparseris pulled in transitively byunparser, so neither needs adding to a Gemfile)Dead version-guard cleanup (exposed by the floor bump)
Chewy::Index::Witchcraftbranched onRUBY_VERSION >= '3.3'to choose between Prism (a default gem since Ruby 3.3) and the externalparsergem. Theparserfallback in therequireblock,check_requirements!, andast_from_procis now unreachable, so witchcraft always uses Prism — also removing a fragile string version comparison. The Prism requirements check itself is dropped: Prism ships with Ruby 3.3+, so it's always present and never needs adding to a Gemfile; the realparserdependency is already covered transitively by theunparsercheck.Chewy::LogSubscriberbranched onActiveSupport.version >= 7.1, unconditionally true since the AS>= 7.2floor; the pre-7.1 positionalcolorcall is removed.Version-anchored docs describing past releases' requirements (e.g. the Chewy 7 → 8 migration guide) are intentionally left unchanged.
Test plan
bundle exec rubocop— no offenses withTargetRubyVersion: 3.3gem build chewy.gemspecsucceeds withrequired_ruby_version >= 3.3