Project

General

Profile

Actions

Feature #19616

closed

Remove ext/readline from Ruby 3.3

Added by hsbt (Hiroshi SHIBATA) about 1 year ago. Updated 11 months ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:113332]

Description

We still bundled ext/readline that is GNU Readline wrapper. But we already have reline written by pure Ruby. It's time to remove it from Ruby releases.

Motivation:

  • We can skip to install readline or libedit for testing ruby language.
  • I hope to reduce external dependencies from the perspective of ruby-build maintainer.

If users hope to use ext/readline, they can install it with gem install readline-ext.

Updated by Eregon (Benoit Daloze) about 1 year ago

I suspect a fair amount of code still uses Readline.readline.
Would it make sense if we had a readline.rb which is just require "reline"; Readline = Reline?
Then also we would no longer need to maintain https://github.com/ruby/readline-ext anymore.

A big part of my concern here is other Ruby implementations like JRuby and TruffleRuby have their own implementations of Readline (using JLine).
It would be great if we can drop them rather than keep maintaining them, but we can only do so if the readline-ext gem is not used much in practice.
Hence if readline-ext would just reuse reline, then we can truly drop the dependency on libreadline and don't need to maintain code linking to it at all anymore (neither the C extension and neither Readline-JLine).

Actions #2

Updated by hsbt (Hiroshi SHIBATA) about 1 year ago

  • Tracker changed from Bug to Feature
  • Backport deleted (3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN)

Updated by hsbt (Hiroshi SHIBATA) about 1 year ago

Would it make sense if we had a readline.rb which is just require "reline"; Readline = Reline?

We already have it: https://github.com/ruby/readline/blob/master/lib/readline.rb

Updated by Eregon (Benoit Daloze) about 1 year ago

Oh this is great, I missed it.

+1 from me.

Updated by hsbt (Hiroshi SHIBATA) 12 months ago

  • Status changed from Open to Closed

I removed ext/readline at https://github.com/ruby/ruby/commit/59fd67fc3d405e529e038172e769ff20a8fb5535

Welcome comments for migrating to reline if you have concern.

Updated by Eregon (Benoit Daloze) 11 months ago

I noticed Rails's Gemfile added a dependency to readline-ext in https://github.com/rails/rails/commit/a6e0b0acb2d1e85a8f90bdf956e7549bcad46896 due to some incompatibility.
I filed https://github.com/ruby/reline/issues/546 to hopefully resolve that incompatibility.

Actions

Also available in: Atom PDF

Like1
Like0Like0Like0Like0Like0Like0Like0