Skip to content

Point Gemfile.next at Rails 8.1 (8.0 -> 8.1 hop) - #75

Merged
JuanVqz merged 1 commit into
mainfrom
feature/rails-81
Jul 7, 2026
Merged

Point Gemfile.next at Rails 8.1 (8.0 -> 8.1 hop)#75
JuanVqz merged 1 commit into
mainfrom
feature/rails-81

Conversation

@JuanVqz

@JuanVqz JuanVqz commented Jul 7, 2026

Copy link
Copy Markdown
Member

What

Advances the next? boot to Rails 8.1 (locked at 8.1.3). The current (else) boot stays on 8.0.5. This is the dual-boot hop for 8.0 → 8.1 — the actual cutover comes later once 8.1 is verified in production.

Branches diverge again, so the Style/IdenticalConditionalBranches rubocop:disable wrapper added during the 8.0 cutover is removed.

Detection scan (rails-81-patterns.yml)

Scanned the app against all high/medium patterns — routes-with-array-paths (removed), Benchmark.ms (removed), unsigned_float/unsigned_decimal, sucker_punch/azure/sidekiq adapters, ActiveSupport::Configurable, mb_chars, ignore_leading_brackets, semicolon query separator. One hit: to_time_preserves_timezone, the line we added during the 8.0 hop.

The one change: to_time_preserves_timezone

Rails 8.1 deprecates config.active_support.to_time_preserves_timezone (it becomes the default; the setter is now a no-op shim). But Rails 8.0 — the current boot — still needs it to silence its "behavior changes in 8.1" warning. So it can't be removed unconditionally during the dual boot.

Fix: guard with NextRails.next?

config.active_support.to_time_preserves_timezone = :zone unless NextRails.next?

Set on 8.0, skipped on 8.1. Removed outright at cutover.

Verification (host, ruby 3.4.9, Postgres 16.13) — both boots

  • Gemfile.next (8.1.3): next?=true; dev + prod boot clean with no to_time deprecation (guard skips the line); suite green — 16 runs, 52 assertions, 0 failures.
  • Gemfile (8.0.5): next?=false; dev + prod boot clean with the to_time line active (no 8.0 warning); suite green; rubocop (42 files) + reek both clean.

Advance the `next?` boot to Rails 8.1 (locked at 8.1.3); the current
(`else`) boot stays on 8.0.5. Branches diverge again, so the
Style/IdenticalConditionalBranches rubocop:disable wrapper from the
cutover is dropped.

Detection scan against rails-81-patterns.yml: the only hit across all
high/medium patterns (routes-with-array-paths, Benchmark.ms,
unsigned_float/decimal, sucker_punch/azure/sidekiq adapters,
ActiveSupport::Configurable, mb_chars, ignore_leading_brackets, ...) was
`to_time_preserves_timezone`, which we set during the 8.0 hop.

Rails 8.1 deprecates `config.active_support.to_time_preserves_timezone`
(it becomes the default no-op shim), but Rails 8.0 -- the current boot --
still needs it to silence its own "behavior changes in 8.1" warning. So
guard it with `unless NextRails.next?`: set on 8.0, skipped on 8.1. To be
removed outright at cutover.

Verified on the host (ruby 3.4.9), both boots:
- Gemfile.next (8.1.3): dev + prod boot clean, no to_time deprecation
  (guard skips the line, next?=true), suite green (16 runs, 0 failures).
- Gemfile (8.0.5): dev + prod boot clean, to_time line active
  (next?=false, no 8.0 warning), suite green, rubocop + reek clean.
@JuanVqz
JuanVqz merged commit a2b763b into main Jul 7, 2026
2 checks passed
@JuanVqz
JuanVqz deleted the feature/rails-81 branch July 7, 2026 21:47
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.

1 participant