Skip to content

Modernize dependencies and gem configuration#26

Merged
saka1 merged 2 commits into
masterfrom
modernize-deps
Apr 10, 2026
Merged

Modernize dependencies and gem configuration#26
saka1 merged 2 commits into
masterfrom
modernize-deps

Conversation

@saka1

@saka1 saka1 commented Apr 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • Update vendored simdjson from v0.5.0 to v4.6.1, raise C++ standard to C++17
  • Raise minimum Ruby from 2.6 to 3.2, CI matrix: Ruby 3.2, 3.3, 3.4, 4.0
  • Modernize gemspec: explicit file list, metadata, move dev deps to Gemfile
  • Update RuboCop to 1.x, GitHub Actions to checkout@v4
  • Fix missing optimization flags in CXXFLAGS (based on @Watson1978's Fix performance on Ruby 3.0 #24)

Details

simdjson C++ library

  • Submodule URL: lemire/simdjsonsimdjson/simdjson (upstream migration)
  • Submodule version: v0.5.0 → v4.6.1
  • simdjson.h must now be included before ruby.h to avoid snprintf macro conflict

Performance fix

  • Incorporated the fix from @Watson1978's Fix performance on Ruby 3.0 #24: Ruby 3.0+ no longer includes $(optflags) in CXXFLAGS automatically, causing simdjson to compile without -O2. Adding $(optflags) $(debugflags) restores proper optimization.

Ruby / Gem

  • required_ruby_version: >= 2.6>= 3.2
  • Gemspec: replaced git ls-files with Dir.glob, removed dead bindir/executables, added rubygems_mfa_required metadata
  • Dev dependencies moved from gemspec to Gemfile (modern Bundler convention)

CI / Tooling

  • actions/checkout@v2@v4
  • Ruby matrix: [2.6, 2.7, 3.0][3.2, 3.3, 3.4, 4.0]
  • RuboCop 0.89 → 1.x (require:plugins:, NewCops: disable)

Test plan

  • bundle exec rake (clobber → compile → test) — 10 tests, 0 failures
  • bundle exec rubocop --fail-level=W — 0 offenses
  • bundle exec rake bench — runs without crashes
  • gem build simdjson.gemspec — produces correct gem with only necessary files
  • CI passes on Ruby 3.2, 3.3, 3.4, 4.0

🤖 Generated with Claude Code

- Update vendored simdjson from v0.5.0 to v4.6.1
- Raise C++ standard from C++11 to C++17
- Raise minimum Ruby from 2.6 to 3.2
- Update CI matrix to Ruby 3.2, 3.3, 3.4, 4.0 with actions/checkout@v4
- Modernize gemspec: explicit file list, metadata, move dev deps to Gemfile
- Update RuboCop to 1.x with plugins syntax
- Fix include order in simdjson_ruby.cpp (simdjson.h before ruby.h)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Based on the fix by Watson1978 in PR #24. Ruby 3.0+ no longer
includes $(optflags) in CXXFLAGS automatically, causing simdjson
to compile without -O2.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@saka1 saka1 merged commit 22db578 into master Apr 10, 2026
4 checks passed
@saka1 saka1 deleted the modernize-deps branch April 10, 2026 21:49
@saka1 saka1 mentioned this pull request Apr 10, 2026
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