Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps-dev): bump json from 2.7.6 to 2.8.1 in /Library/Homebrew #18725

Merged
merged 6 commits into from
Nov 8, 2024

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 6, 2024

Bumps json from 2.7.6 to 2.8.1.

Release notes

Sourced from json's releases.

v2.8.1

  • Fix the java version of the package to include the extension implementation. Only concerns JRuby.

Full Changelog: ruby/json@v2.8.0...v2.8.1

v2.8.0

What's Changed

  • Emit a deprecation warning when JSON.load create custom types without the create_additions option being explictly enabled.
    • Prefer to use JSON.unsafe_load(string) or JSON.load(string, create_additions: true).
  • Emit a deprecation warning when serializing valid UTF-8 strings encoded in ASCII_8BIT aka BINARY.
  • Bump required Ruby version to 2.7.
  • Add support for optionally parsing trailing commas, via allow_trailing_comma: true, which in cunjunction with the pre-existing support for comments, make it suitable to parse jsonc documents.
  • Many performance improvements to JSON.parse and JSON.load, up to 1.7x faster on real world documents.
  • Some minor performance improvements to JSON.dump and JSON.generate.

Parsing performance

Parsing performance is improved by 50-70% on realistic benchmarks, and even more on micro-benchmarks: https://gist.github.com/casperisfine/cf4b3a0594fae24b7d0eb93daaf3841a

== Parsing activitypub.json (58160 bytes)
ruby 3.4.0dev (2024-11-06T07:59:09Z precompute-hash-wh.. 7943f98a8a) +YJIT +PRISM [arm64-darwin24]
Warming up --------------------------------------
          json 2.7.2   638.000 i/100ms
                  oj   798.000 i/100ms
          Oj::Parser   948.000 i/100ms
           rapidjson   631.000 i/100ms
Calculating -------------------------------------
          json 2.7.2      6.423k (± 1.3%) i/s  (155.70 μs/i) -     32.538k in   5.067149s
                  oj      7.989k (± 1.0%) i/s  (125.17 μs/i) -     40.698k in   5.094544s
          Oj::Parser      9.472k (± 1.3%) i/s  (105.58 μs/i) -     47.400k in   5.005119s
           rapidjson      6.354k (± 1.1%) i/s  (157.37 μs/i) -     32.181k in   5.064962s

Comparison: json 2.8.0: 9510.0 i/s Oj::Parser: 9471.9 i/s - same-ish: difference falls within error oj: 7989.4 i/s - 1.19x slower json 2.7.2: 6422.5 i/s - 1.48x slower rapidjson: 6354.5 i/s - 1.50x slower

== Parsing twitter.json (567916 bytes) ruby 3.4.0dev (2024-11-06T07:59:09Z precompute-hash-wh.. 7943f98a8a) +YJIT +PRISM [arm64-darwin24] Warming up -------------------------------------- json 2.7.2 52.000 i/100ms oj 64.000 i/100ms Oj::Parser 76.000 i/100ms rapidjson 57.000 i/100ms </tr></table>

... (truncated)

Changelog

Sourced from json's changelog.

2024-11-06 (2.8.1)

  • Fix the java packages to include the extension.

2024-11-06 (2.8.0)

  • Emit a deprecation warning when JSON.load create custom types without the create_additions option being explictly enabled.
    • Prefer to use JSON.unsafe_load(string) or JSON.load(string, create_additions: true).
  • Emit a deprecation warning when serializing valid UTF-8 strings encoded in ASCII_8BIT aka BINARY.
  • Bump required Ruby version to 2.7.
  • Add support for optionally parsing trailing commas, via allow_trailing_comma: true, which in cunjunction with the pre-existing support for comments, make it suitable to parse jsonc documents.
  • Many performance improvements to JSON.parse and JSON.load, up to 1.7x faster on real world documents.
  • Some minor performance improvements to JSON.dump and JSON.generate.
Commits
  • 49650f7 Release 2.8.1
  • 07cf261 Fix gemspec to include .jar files
  • b9c8024 Merge pull request #693 from casperisfine/update-changelog
  • 8071cc6 Release 2.8.0
  • f5812d8 Update benchmark annotations
  • 3f950f2 Merge pull request #692 from casperisfine/custom-parse-int
  • 3a4dc9e Implement a fast path for integer parsing
  • d315ac8 Merge pull request #689 from casperisfine/parser-escape
  • 94d679f Merge pull request #690 from nobu/right-shift-uchar
  • fb82373 Fix right shift warnings
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [json](https://github.com/ruby/json) from 2.7.6 to 2.8.1.
- [Release notes](https://github.com/ruby/json/releases)
- [Changelog](https://github.com/ruby/json/blob/master/CHANGES.md)
- [Commits](ruby/json@v2.7.6...v2.8.1)

---
updated-dependencies:
- dependency-name: json
  dependency-type: indirect
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
@dependabot dependabot bot added dependencies Bumping Gemfile dependencies ruby Pull requests that update Ruby code labels Nov 6, 2024
@dduugg dduugg force-pushed the dependabot/bundler/Library/Homebrew/json-2.8.1 branch from 5470905 to ddece8a Compare November 7, 2024 17:15
@dduugg dduugg force-pushed the dependabot/bundler/Library/Homebrew/json-2.8.1 branch 5 times, most recently from 5ed1ff4 to e11a768 Compare November 7, 2024 18:27
@dduugg dduugg force-pushed the dependabot/bundler/Library/Homebrew/json-2.8.1 branch from e11a768 to acb4edd Compare November 7, 2024 19:08
@dduugg dduugg force-pushed the dependabot/bundler/Library/Homebrew/json-2.8.1 branch from b3f7c9f to ebe1e50 Compare November 7, 2024 19:26
puts JSON.pretty_generate(json)
# json v2.8.1 is inconsistent it how it renders empty arrays,
# so we use `[]` for consistency:
puts JSON.pretty_generate(json).gsub(/\[\n\n\s*\]/, "[]")
Copy link
Member

Choose a reason for hiding this comment

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

Seems like a bug that should be reported upstream?

Copy link
Member

Choose a reason for hiding this comment

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

I'm working on it. It's actually a bug that's been around a while, you can even see it in our fixtures:


There's also an SO question around the issue: https://stackoverflow.com/questions/58361230/avoiding-extra-lines-in-ruby-json-pretty-generate

The unusual thing (to me) is seeing different output on substantially similar inupts.

Copy link
Member

Choose a reason for hiding this comment

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

I couldn't repro on my mac, so I've given up filing an issue. (It seems limited to the "generic" os in testing, in case you want to chase it down.)

@MikeMcQuaid MikeMcQuaid merged commit f119d2e into master Nov 8, 2024
29 checks passed
@MikeMcQuaid MikeMcQuaid deleted the dependabot/bundler/Library/Homebrew/json-2.8.1 branch November 8, 2024 08:45
@MikeMcQuaid
Copy link
Member

Thanks @dduugg!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Bumping Gemfile dependencies ruby Pull requests that update Ruby code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants