Skip to content

Pin i18n < 1.15 on Ruby < 3.2 to keep CI deterministic#620

Closed
mitchh456 wants to merge 1 commit into
masterfrom
fix-ci-i18n-ruby31
Closed

Pin i18n < 1.15 on Ruby < 3.2 to keep CI deterministic#620
mitchh456 wants to merge 1 commit into
masterfrom
fix-ci-i18n-ruby31

Conversation

@mitchh456

Copy link
Copy Markdown
Contributor

The failure

test (3.1) errors during test_helper load:

NoMethodError: undefined method `[]' for Fiber:Class
  i18n-1.15.0/lib/i18n.rb:58:in `config'
  activesupport-7.2.3.1/lib/active_support/i18n.rb:16
  test/test_helper.rb:12   (require "active_support/core_ext/string/inflections")

Root cause

The pre-3.2 CI lanes use the default Gemfile, and Gemfile.lock is gitignored — so bundler resolves the latest i18n fresh on every run. i18n 1.15.0 began calling Fiber storage (Fiber.[]), which only exists on Ruby 3.2+, so on Ruby ≤ 3.1 ActiveSupport fails to load it. (master's last green run predates 1.15.0; it would hit this on a re-run too.)

Upstream fixed it in i18n 1.15.2, but the gitignored-lock + unpinned-transitive-dep setup leaves the EOL-track Rubies exposed to the next such release. This caps i18n < 1.15 only on Ruby < 3.2, keeping those lanes on the stable 1.14 line for a deterministic build. Ruby 3.2+ is untouched and continues to use the latest i18n.

Verification (Docker, ruby:3.1)

Gemfile resolved i18n require "active_support/core_ext/string/inflections"
with cap (this PR) 1.14.8 loads OK
no cap (latest) 1.15.2 OK (upstream already fixed)
no cap @ 1.15.0 (CI on 6/18) 1.15.0 NoMethodError … Fiber:Class

activesupport 7.2 requires i18n >= 1.6, < 2, so 1.14.8 satisfies it cleanly.

Note / follow-up

The deeper fragility is that the EOL-Ruby matrix resolves bleeding-edge transitive deps from an uncommitted lock, so this class of breakage will recur with other gems. Committing per-lane lockfiles (or pinning) would make CI fully reproducible — out of scope here, happy to do it separately if wanted.

🤖 Generated with Claude Code

The pre-3.2 CI matrix uses the default Gemfile, and Gemfile.lock is gitignored,
so bundler resolves the latest i18n fresh on every run. i18n 1.15.0 started
calling Fiber storage (`Fiber.[]`, Ruby 3.2+), so on Ruby <= 3.1 ActiveSupport
failed to load with `NoMethodError: undefined method '[]' for Fiber:Class`,
breaking `test (3.1)` (and any pre-3.2 lane that happened to resolve it).

Upstream fixed this in i18n 1.15.2, but the gitignored-lock + unpinned-dep
setup leaves the EOL-track Rubies exposed to the next such release. Pin them to
the stable 1.14 line for a deterministic build; Ruby 3.2+ continues to use the
latest i18n.

Verified in a ruby:3.1 container: with the cap, i18n resolves to 1.14.8 and
`require "active_support/core_ext/string/inflections"` (the exact require that
failed in CI) loads cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Spg5MGVB1XXoxJh6LnmgRu
@mitchh456

Copy link
Copy Markdown
Contributor Author

not reliably able to recreate in CI actually. closing

@mitchh456 mitchh456 closed this Jun 24, 2026
@mitchh456 mitchh456 deleted the fix-ci-i18n-ruby31 branch June 24, 2026 19:39
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