Skip to content

Replacing Ripper by Prism #1024

@eregon

Description

@eregon

Description

It would be great to replace the usages of Ripper in IRB by Prism.
There are many advantages:

  • Prism is faster than Ripper, and the difference is even more visible on TruffleRuby, where irb is visibly less reactive because of Ripper.
  • Prism provides a much better API
  • Prism works well on all Ruby implementations, Ripper is a big hack which is very hard to support on all Ruby implementations (at least it has proven difficult to maintain on CRuby, JRuby and TruffleRuby, right now TruffleRuby is updating to Ruby 3.3 and Ripper is proving to be again a pain to get working, it even has a copy of st.c now to give an idea, on top of depending on many internal CRuby files).
  • Prism is actually used in CRuby now as the default parser since Ruby 3.4 preview 2 and is the only parser in TruffleRuby, so it is the source of truth when it comes to parsing Ruby code.

Could this be considered? What are the challenges?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions