Add TruffleRuby CI job#2996
Merged
Merged
Conversation
Add an experimental CI workflow that builds the C extension and runs the test suite on TruffleRuby. The job is marked continue-on-error so it reports the current status without blocking the build.
Add an `omit_on_truffle_ruby!` helper (class-level and instance-level) to centralize skipping tests that cannot pass on TruffleRuby, instead of sprinkling engine checks throughout the suite. Skip whole classes that depend on features TruffleRuby lacks: - prototype tests (RubyVM::AbstractSyntaxTree) - runtime test tester (TracePoint :end event) Skip the few isolated cases in otherwise-supported classes (CLI prototype/ test commands, inline comment parsing via prism, loop Enumerator type checking, invalid UTF-8 handling, GC.compact). With these omitted, the suite is green on TruffleRuby, so drop continue-on-error from the workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds an experimental CI workflow (
.github/workflows/truffleruby.yml) that builds the C extension and runs the test suite on TruffleRuby, so we can track whether RBS works on TruffleRuby.The job is marked
continue-on-error: truebecause TruffleRuby support is experimental — it reports the current status without blocking the build.Workflow details
trufflerubyviaruby/setup-rubyLANG: en_US.UTF-8(TruffleRuby falls back to US-ASCII and emits warnings/errors when the locale is not UTF-8)bin/setup(compiles the C extension) thenrake testprofilersandtypecheck_testbundle groups (not needed for the smoke test)Verification
Verified locally with TruffleRuby 34.0.1 (
like ruby 3.4.9):rbs_extensionC extension compile/link-Wc++-compatare auto-skipped bymkmf)Known gaps / differences on TruffleRuby:
rbs prototype rb/rbi/runtime—RubyVM::AbstractSyntaxTreeis missing on TruffleRuby (already documented as MRI-only incli.rb).AST::Ruby) — TruffleRuby's prism returnsnilfromPrism::Location#start_line_slice, causing errors.\xFF) does not raiseParsingErroras it does on MRI.So RBS's core functionality works on TruffleRuby, but the full suite is not green yet — hence the
continue-on-errorjob.https://claude.ai/code/session_012razqriUGBbQnyVt6egp22
Generated by Claude Code