Skip to content

build: keep json below 3 for Rails 7 appraisals - #151

Merged
RenzoMinelli merged 1 commit into
masterfrom
rm--pin-json-for-rails-7
Sep 25, 2026
Merged

RenzoMinelli merged 1 commit into
masterfrom
rm--pin-json-for-rails-7

Conversation

@RenzoMinelli

Copy link
Copy Markdown
Contributor

What: Pins json below 3 in the rails-7_1 and rails-7_2 appraisals, and in devise-5_0 on Ruby below 3.2, where it resolves Rails 7.

Why: json 3.0 rejects the quirks_mode option that ActiveSupport 7.1 and 7.2 pass to JSON.generate. Every Rails 7 job fails with ArgumentError: unknown keyword: quirks_mode, as in this run. master will fail the same way on its next run.

How to test: CI is green.

json 3 no longer accepts the `quirks_mode` option that ActiveSupport 7.1
and 7.2 pass to `JSON.generate`, so every Rails 7 job failed with
`ArgumentError: unknown keyword: quirks_mode`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread Appraisals
appraise "rails-7_2" do
gem "rails", "~> 7.2.x"

# ActiveSupport 7.x passes `quirks_mode` to JSON.generate, which json 3 rejects.

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.

What do you think about pointing to rails/rails#58685 instead? Although that issues is for Rails 8...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

That issue is ActiveSupport 8.1 passing a positional hash to JSON.parse, fixed in rails/rails#58601 for 8.1 only. Ours is 7.x passing quirks_mode to JSON.generate, which no Rails issue tracks. The common cause is in json 3.0's changelog: unknown options now raise ArgumentError.

@RenzoMinelli
RenzoMinelli merged commit db72646 into master Sep 25, 2026
31 checks passed
@RenzoMinelli
RenzoMinelli deleted the rm--pin-json-for-rails-7 branch September 25, 2026 19:43
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