Upgrade to oj v3.16.3
Why is this change being made?
oj v3.7.9 doesn't compile with clang 16:
custom.c:357:23: error: incompatible function pointer types passing 'int (VALUE, VALUE, Out)' (aka 'int (unsigned long, unsigned long, struct _out *)') to parameter of type 'int (*)(VALUE, VALUE, VALUE)' (aka 'int (*)(unsigned long, unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
rb_hash_foreach(obj, hash_cb, (VALUE)out);
^~~~~~~
/Users/stanhu/.asdf/installs/ruby/3.0.6/include/ruby-3.0.0/ruby/internal/intern/hash.h:33:35: note: passing argument to parameter here
void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE);
^
custom.c:664:26: error: incompatible function pointer types passing 'int (ID, VALUE, Out)' (aka 'int (unsigned long, unsigned long, struct _out *)') to parameter of type 'int (*)(ID, VALUE, st_data_t)' (aka 'int (*)(unsigned long, unsigned long, unsigned long)') [-Wincompatible-function-pointer-types]
rb_ivar_foreach(obj, dump_attr_cb, (VALUE)out);
^~~~~~~~~~~~
/Users/stanhu/.asdf/installs/ruby/3.0.6/include/ruby-3.0.0/ruby/internal/intern/variable.h:50:35: note: passing argument to parameter here
void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t);
^
2 errors generated.
make: *** [custom.o] Error 1
https://github.com/ohler55/oj/commit/0d786fa6 fixed this issue in oj v3.10.1.
Relates to:
- https://github.com/ohler55/oj/discussions/916
- https://discourse.llvm.org/t/clang-16-notice-of-potentially-breaking-changes/65562
Author and Reviewer Checklist
Please verify the check list and ensure to tick them off before the MR is merged.
-
Provided a concise title for this Merge Request (MR) -
Added a description to this MR explaining the reasons for the proposed change, per say why, not just what - Copy/paste the Slack conversation to document it for later, or upload screenshots. Verify that no confidential data is added, and the content is SAFE
-
Assign reviewers for this MR to the correct Directly Responsible Individual/s (DRI) - If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
Maintained by
section on the page being edited - If your manager does not have merge rights, please ask someone to merge it AFTER it has been approved by your manager in #mr-buddies
- The when to get approval handbook section explains the workflow in more detail
- If the DRI for the page/s being updated isn’t immediately clear, then assign it to one of the people listed in the
-
For transparency, share this MR with the audience that will be impacted. -
Team: For changes that affect your direct team, share in your group Slack channel -
Department: If the update affects your department, share the MR in your department Slack channel -
Company: If the update affects all (or the majority of) GitLab team members, post an update in #whats-happening-at-gitlab linking to this MR - For high-priority company-wide announcements work with the internal communications team to post the update in #company-fyi and align on a plan to circulate in additional channels like the "While You Were Iterating" Newsletter
-
Edited by Stan Hu