Skip to content

Bump CI to JRuby 10, declare csv as an explicit dependency - #661

Merged
tungleduyxyz merged 3 commits into
masterfrom
jruby10-upgrade
Sep 15, 2026
Merged

tungleduyxyz merged 3 commits into
masterfrom
jruby10-upgrade

Conversation

@tungleduyxyz

Copy link
Copy Markdown
Contributor

Summary

Phase 1 of the JRuby 10 upgrade (see workspace plan). Rails stays on ~> 7.2 for this phase; Rails 8 is a follow-on phase gated on a stable activerecord-jdbc-adapter release.

  • Bump CI matrix from jruby-9.4.15.0 to jruby-10.0.6.0 (LTS line; JRuby 10.1.x is still "tip"/experimental per upstream).
  • Update README's Ruby/JRuby version requirement text.
  • Declare csv as an explicit gemspec dependency: it became a "bundled gem" (no longer a default gem) as of Ruby 3.4, which JRuby 10 targets. Several controllers (accounts, invoices, payments, audit_logs, account_timelines) require csv directly for CSV export; without an explicit dependency, Rails eager loading (production boot) crashes with LoadError: cannot load such file -- csv.

Validation

Confirmed locally with real JRuby 10.1.1.0 + JDK 21:

  • bundle install resolves cleanly (no Gemfile/gemspec changes needed beyond this PR).
  • RAILS_ENV=test bundle exec rails runner boots successfully and establishes a JDBC/SQLite connection.
  • The csv fix was validated end-to-end by building the killbill-admin-ui-standalone WAR with this engine pulled in via a local path override and confirming Rails.application.eager_load! no longer raises.

Also dropped the now-unnecessary JRuby-9.4.10 jar-dependencies ~> 0.4.1 workaround gem (upstream jruby/jruby#7262 is closed).

- CI: bump jruby-9.4.15.0 -> jruby-10.0.6.0 (both mysql2/postgresql matrix legs).
- README: update Ruby/JRuby version requirement text accordingly.
- kaui.gemspec: csv is a "bundled gem" as of Ruby 3.4 (no longer a default
  gem), so it must be an explicit dependency for it to be available via
  Bundler.require. Several controllers (accounts, invoices, payments,
  audit_logs, account_timelines) `require 'csv'` directly; without this,
  Rails eager loading (production/WAR boot) crashes with:
    LoadError: cannot load such file -- csv
  Validated locally: bundle install + Rails boot + JDBC/SQLite connection
  all succeed unmodified under real JRuby 10.1.1.0/JDK21 with this change.

Co-authored-by: Copilot <[email protected]>
tungleduyxyz and others added 2 commits September 9, 2026 11:27
A support engineer independently hit this same crash and pointed to a now-filed JRuby bug (jruby/jruby#9651): assigning to an outer local variable named 'it' inside a block silently creates a block-local shadow instead of updating the outer one on JRuby 10, breaking sorbet-runtime's signature-validation loop counter (T::Private::Methods::Signature#each_args_value_type). No functional change - just documenting the confirmed root cause for future readers.

Co-authored-by: Copilot <[email protected]>
Defense-in-depth fix, part of the same root-cause investigation as the
CI failures fixed in killbill-kpm-ui and killbill-email-notifications-ui
(see their jruby10-upgrade branch commits for full details).

This repo currently resolves json 2.x thanks only to an INCIDENTAL
transitive constraint (rubocop's own `json ~> 2.3` dependency in whatever
version bundler happens to resolve here) - not a real guarantee. rubocop
1.90.0 (released 2026-08-24) loosened its own json dependency to
`json >= 2.3` (no upper bound), so this repo's unpinned `gem 'json'`
could silently start resolving json 3.x on any future bundle install
(Gemfile.lock isn't committed in this repo), exactly as already happened
in killbill-kpm-ui and killbill-email-notifications-ui once json
3.0.0/3.0.1 were published (2026-09-07/08).

json 3.0 dropped the quirks_mode keyword that ActiveSupport::JSON.encode
still passes to JSON.generate (not fixed until Rails 8.1.0), raising
ArgumentError on any #to_json call - including killbill-client's model
classes, used throughout this engine.

Pinned `gem 'json', '~> 2.21'` explicitly rather than relying on rubocop's
transitive constraint.

Verified: bundle install resolves json (2.21.2); test suite passes.

Co-authored-by: Copilot <[email protected]>
@tungleduyxyz
tungleduyxyz merged commit 9f6b57a into master Sep 15, 2026
13 checks passed
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