You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Exit strategy for vendor/opal-oga + vendor/opal-ruby-ll: upstream the Opal lexer, scope forks to the Opal leg, no new C #835
vendor/opal-oga / vendor/opal-ruby-ll are lutaml-maintained Opal-compatibility forks of oga and ruby-ll: upstream oga's lexer is the liboga C extension, which cannot load under Opal (Ruby→JS). The forks add a pure-Ruby lexer (ext/pureruby/oga/native/lexer.rb) and an RUBY_PLATFORM == 'opal' conditional in lib/oga.rb; under MRI the conditional falls through to the C extension — which is why CI compiles C for dev-only pins (#832).
The problem
We carry two full parser forks to support one runtime (Opal), and pay C-compilation cost in every MRI CI leg for code that is upstream's, not ours.
The strategic native direction is Rust (leptris family crate, leptris-ruby#294; parsanol-ruby as the pipeline reference). The C fork is not part of that future — but the pure-Ruby Opal lexer is not replaceable by Rust either: native extensions do not run under Opal/JS. The fork is a compatibility shim, and its exit is upstreaming, not rewriting.
Exit strategy
Upstream the Opal compatibility to yorickpeterse/oga (the patch is small and mechanical: pure-Ruby lexer file + platform conditional — originated in plurimath/oga, carried since). Once released upstream, delete both forks and bundle add oga normally.
Long term: if leptris/wasm ever reaches Opal-ruby (parsanol carries a wasm.yml.disabled — the pattern exists), the pure-Ruby lexer could itself be replaced; until then it is the only parser Opal can run.
Non-goal
Rewriting the lexer in Rust. Under Opal it cannot load; under MRI, oga is a fallback adapter behind moxml's leptris preference. New native code is Rust by policy (#831) — the fork is legacy tolerance with a retirement plan, not an investment.
Status update: the upstream half of this strategy is withdrawn permanently — the oga maintainer closed the attempt and blocked the account, and per the project's standing rule nothing will ever be sent upstream again. The work stays in our own fork: lutaml/oga carries the validated pure-Ruby lexer (1,628 examples green under OGA_PURERUBY=1) and serves the Opal leg; vendor/opal-oga and vendor/opal-ruby-ll remain scoped to that leg with no new C. The remaining actionable item is fork hygiene only; the exit strategy as originally written (upstream acceptance) is not viable.
Activity
ci: scope the vendored Opal forks to the Opal leg (#835 step 2)
ci: scope the vendored Opal forks to the Opal leg (#835 step 2)
ronaldtse commentedon Sep 28, 2026
This is a bad take. We do not need to use Oga or ruby-ll here. Closing.
ronaldtse commentedon Sep 28, 2026
Status update: the upstream half of this strategy is withdrawn permanently — the oga maintainer closed the attempt and blocked the account, and per the project's standing rule nothing will ever be sent upstream again. The work stays in our own fork: lutaml/oga carries the validated pure-Ruby lexer (1,628 examples green under OGA_PURERUBY=1) and serves the Opal leg; vendor/opal-oga and vendor/opal-ruby-ll remain scoped to that leg with no new C. The remaining actionable item is fork hygiene only; the exit strategy as originally written (upstream acceptance) is not viable.