Allow JSON 3 on newer Rubies - #429
Merged
Merged
Conversation
Remove the global JSON 2 constraint now that multi_json 1.21.2 supports JSON 3. Keep the constraint in Rails 7 appraisals because those still test Ruby 3.0 and 3.1, while multi_json 1.21.2 requires Ruby 3.2.
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
multi_json1.21.2 supports JSON 3 in itsjson_gemadapterjson < 3in the Rails 7.0, 7.1, and 7.2 appraisals because those still test Ruby 3.0/3.1, whilemulti_json1.21.2 requires Ruby 3.2Oj compatibility
The Time serialization problem mentioned in the
multi_jsonchangelog is tracked upstream as ohler55/oj#1104. A proposed fix exists in ohler55/oj#1106, but it is not yet merged or released.This does not affect ChronoModel: Oj is neither a dependency nor configured by this project,
multi_json1.21.2 prefers the JSON gem during automatic adapter selection, and ChronoModel uses MultiJson only for PostgreSQL view metadata composed of ordinary JSON primitives rather thanTimevalues. Local verification selectedMultiJSON::Adapters::JsonGem; Oj was not installed.Verification
bundle exec rubocopbundle exec rakewith Rails 8.1,multi_json1.21.2, and JSON 3.0.1: 509 examples, 0 failuresBUNDLE_GEMFILE=/Users/geremia/dev/ifad/chronomodel/gemfiles/rails_8.0.gemfile bundle exec rakewith JSON 3.0.1: 509 examples, 0 failuresMultiJSON::Adapters::JsonGemwith JSON 3.0.1multi_json1.19.1, preserving the compatible legacy pair