Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opalgems #2274

Open
2 of 7 tasks
hmdne opened this issue Aug 16, 2021 · 0 comments
Open
2 of 7 tasks

Opalgems #2274

hmdne opened this issue Aug 16, 2021 · 0 comments

Comments

@hmdne
Copy link
Member

hmdne commented Aug 16, 2021

Ruby has now an effort to separate a lot of its stdlib to become gems - https://stdgems.org . Many of them we can run unchanged, some we will need to adapt. My proposal is as follows:

  • create a GitHub opalgems organization opalgems
  • create opalgems the gem to be required by default by opal (the compiler), which would mostly just bundle the standard gems and their adaptations and adjust load paths
  • devise a DSL to maintain a list of available standard gems: https://github.com/opalgems/opalgems/blob/master/lib/opalgems/config.rb
  • get those gems that need slight patching as forks in the opalgems organization (then - further down the line, rebase them once they get updated - and further down the line, maybe even upstream some of those patches)
  • remove parts of the stdlib from opal (like Matrix for instance) and let opalgems handle them (doesn't apply to the full reimplementations)
  • make opalgems the gem test all the standard gems with minitest (also applies to full reimplementations)
  • opalgems to automatically release NPM packages for the NPM-based workload (use mostly seamlessly things like REXML by just doing yarn add @opalgems/rexml in an otherwise JS-only codebase?)
  • while this isn't the part of the proposal, in the future consider integrating Gemfile for maintaining Opal's load paths too

What can we gain from this effort:

  • The esoteric parts of Ruby's stdlib can be supported with a little effort
  • We can enable a lot more mspec tests (can we say at some point that Opal passes 95% of MRI's tests? :O but mostly - this gives us much more coverage for free)
  • A road ahead towards Opal becoming a viable alternative to MRI
  • Easier maintenance for vendored parts of stdlib
  • Progressively getting closer to Ruby in terms of compatibility
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

No branches or pull requests

1 participant