Skip to content

Drop support for Ruby 3.2 and remove dead version guards#1029

Open
mattmenefee wants to merge 1 commit into
toptal:masterfrom
mattmenefee:drop-ruby-3.2
Open

Drop support for Ruby 3.2 and remove dead version guards#1029
mattmenefee wants to merge 1 commit into
toptal:masterfrom
mattmenefee:drop-ruby-3.2

Conversation

@mattmenefee

@mattmenefee mattmenefee commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • (Breaking) Drops support for Ruby 3.2, which reached end-of-life on 2026-04-01 and no longer receives security patches.
  • Raises the floor to Ruby 3.3 (currently in security maintenance, EOL expected 2027-03-31):
    • 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: TargetRubyVersion 3.23.3
    • README compatibility statement and CONTRIBUTING prerequisites
    • Troubleshooting guide: drop the parser / prism version conditional from the Witchcraft optional-dependency list, 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)

Dead version-guard cleanup (exposed by the floor bump)

  • Chewy::Index::Witchcraft branched on RUBY_VERSION >= '3.3' to choose between Prism (a default gem since Ruby 3.3) and the external parser gem. The parser fallback in the require block, 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 itself is dropped: Prism ships with Ruby 3.3+, so it's always present and never needs adding to a Gemfile; the real parser dependency is already covered transitively by the unparser check.
  • Chewy::LogSubscriber branched on ActiveSupport.version >= 7.1, unconditionally true since the AS >= 7.2 floor; the pre-7.1 positional color call 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 with TargetRubyVersion: 3.3
  • gem build chewy.gemspec succeeds with required_ruby_version >= 3.3
  • CI green on the Ruby 3.3 / 3.4 / 4.0 matrix

@mattmenefee mattmenefee requested a review from a team as a code owner June 1, 2026 23:26
@mattmenefee mattmenefee force-pushed the drop-ruby-3.2 branch 2 times, most recently from 133d92c to 131e51e Compare June 2, 2026 00:40
@mattmenefee mattmenefee changed the title Drop support for Ruby 3.2 Drop support for Ruby 3.2 and remove dead version guards Jun 2, 2026
@mattmenefee mattmenefee mentioned this pull request Jun 2, 2026
4 tasks
@AlfonsoUceda

Copy link
Copy Markdown
Contributor

Thanks @mattmenefee I'm planning this for v9

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants