Skip to content

chore: support Ruby 3.1 across Smithy gems (part 3) - #381

Merged
jterapin merged 12 commits into
mainfrom
ruby-3.1-minimum-part-3
Oct 21, 2026
Merged

jterapin merged 12 commits into
mainfrom
ruby-3.1-minimum-part-3

Conversation

@jterapin

@jterapin jterapin commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Note

Stacked on #380, which includes the runtime preparation from #378. Retarget to main after both parents merge. Local validation is complete; GitHub CI is pending.

Context

The gems currently require Ruby 3.3. This lowers the minimum requirement to Ruby 3.1 for the generator, runtimes, server placeholder, and generated client/schema gems.

Description

  • Use Rails 7.2 for the generator so its dependency supports Ruby 3.1.
  • Lower all seven maintained gem requirements and generated-gem metadata to Ruby 3.1, including matching assertions and sample gemspecs.
  • Add Ruby 3.1, Ruby 3.2, and JRuby 9.4 to both CI matrices, keeping 3.3, 3.4, 4.0, and JRuby 10.0. Exclude the RBS group from spec jobs; keep RBS and lint on Ruby 4.0.
  • Target Ruby 3.1 in RuboCop, remove the argument-forwarding exclusions, and use ... forwarding in PageEnumerator#reduce.
  • Match Tempfile before File in log formatting so JRuby 9.4 retains the temporary-file label. Existing logging examples cover both paths.
  • Refresh development setup instructions, allow RBS checks on a compatible local Ruby version, and ignore .bundle/ so local Bundler settings stay out of commits.

Testing

Generator and runtime suites passed in the source checkout on Ruby 3.1.7, 3.2.11, 3.3.11, 3.4.9, 4.0.3, JRuby 9.4.15.0, and JRuby 10.0.7.0. All suites had zero failures; existing pending tests are included below.

Suite Examples MRI pending JRuby 9.4/10.0 pending
Generator unit 517 0 2
Generated endpoints 76 0 0
Generated protocols 117 0 43
Client 919 2 86
Schema 149 0 0
CBOR 269 0 0
JSON 70 0 7
XML 59 0 0
  • Fresh Ruby 3.1 bundle resolved Rails 7.2.4 and SimpleCov 0.22.0 with the RBS group excluded. A subsequent audit parsed all 399 tracked Ruby and gemspec files and reran every generator/runtime suite with zero failures.
  • Verified .bundle/config is ignored and git diff --check passes.
  • RBS on Ruby 4.0: generator 127 unit, 76 endpoint, and 117 protocol examples; client 867 examples (2 existing pending); schema 149; CBOR 269; JSON 70; XML 59. Zero failures.
  • Ruby 3.1 runtime/generated-package checks passed: empty/populated types, a stubbed CBOR operation, and client-only loading without the generator. Clean installed-generator loading still raises LoadError because its existing source-relative CBOR protocol path requires the repository layout; the packaging fix is deferred with a TODO.
  • Server placeholder parsed and loaded on Ruby 3.1. Maintained sample gemspecs matched actual regeneration from unchanged models.
  • Downstream AWS protocols on Ruby 4.0: 1,106 examples, zero failures, 4 existing pending tests, using local Smithy source through a temporary bundle.
  • RuboCop: 374 files, no offenses. Workflow YAML validation and git diff --check passed.
  • Forwarding cleanup: client specs (919 examples, 2 existing pending), client RBS (867 examples, 2 existing pending), and RuboCop passed on Ruby 4.0.3. All four reduce calling forms passed on Ruby 3.1.7, JRuby 9.4.15.0, and JRuby 10.0.7.0.

🤖 This PR description was drafted with AI assistance for @jterapin. ✨

@jterapin
jterapin added this pull request to stack #382 October 14, 2026 23:25
@jterapin
jterapin marked this pull request as ready for review October 15, 2026 21:37
@jterapin
jterapin requested review from a team as code owners October 15, 2026 21:37
@jterapin
jterapin requested review from sichanyoo and siddsriv and removed request for sichanyoo and siddsriv October 15, 2026 21:37
@jterapin
jterapin force-pushed the ruby-3.1-minimum-part-3 branch 2 times, most recently from 3854f58 to ec5b50d Compare October 21, 2026 14:56
Base automatically changed from ruby-3.1-minimum-part-2 to main October 21, 2026 16:40
@jterapin
jterapin force-pushed the ruby-3.1-minimum-part-3 branch from ec5b50d to d7b0385 Compare October 21, 2026 16:41
@jterapin
jterapin merged commit d59968f into main Oct 21, 2026
16 checks passed
@jterapin
jterapin deleted the ruby-3.1-minimum-part-3 branch October 21, 2026 16:57
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.

3 participants