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

Replace Ripper with Prism's Ripper compatibility layer #3481

Open
andrykonchin opened this issue Mar 11, 2024 · 1 comment
Open

Replace Ripper with Prism's Ripper compatibility layer #3481

andrykonchin opened this issue Mar 11, 2024 · 1 comment
Assignees

Comments

@andrykonchin
Copy link
Member

Replace Ripper C code with Prism::Translation::Ripper implementation.

@andrykonchin andrykonchin self-assigned this Mar 11, 2024
@eregon
Copy link
Member

eregon commented Mar 11, 2024

Adding some notes: ruby/prism#2354 (comment) so the Prism Ripper compat should be mostly complete.
So it'd be worth to try using Prism to replace Ripper in TruffleRuby.
That'd need shipping the Ruby sources of Prism in TruffleRuby as well, probably best as a default gem like in CRuby 3.3 so it can be upgraded and e.g. there is no issue when loading Prism gem + Ripper.
So maybe best done after importing Ruby 3.3 sources, OTOH Prism in Ruby 3.3.0 is too old, so seems no need to wait.
Probably we should have a script to copy the files from the prism repo to places that make sense for a default gem, i.e. similar places for other default gems.

Regarding which libprism to use we should just use the one from the gem, because the Ruby code depends on it, so it's necessary. Also there is a the syntax version in Prism which should be enough to guarantee Ripper returns something that's the same version as RUBY_VERSION.

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

2 participants