JRuby issues with irb and reline
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 478
- Forks
- 158
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 12
Description
Description
I have been working to switch JRuby to reline+irb gems and things are close but I have seen two issues testing it today.
- Backspace does not work. It seems to be ignored. ^H works, but shows the ^H character briefly before backspacing.
- The prompt line seems to print out again before running whatever code you entered:
$ irb
irb(main):001:0> puts
irb(main):001:0> puts
=> nil
irb(main):002:0> exit
irb(main):002:0> exit
I am not sure if these are IRB issues or Reline issues, and I need help figuring out what is wrong!
Note: JRuby uses an FFI-based version of io-console that we recently upstreamed to the gem. The io-console tests can't run green on JRuby due to our broken PTY library, but they run green on CRuby. There may still be bugs. See https://github.com/ruby/io-console/pull/22 for the work I did to get it working.
To investigate this it would be best to use the irb+reline branch I have pushed here: https://github.com/jruby/jruby/pull/5803
Note another issue we thought might be fixed by this move still seems broken under new IRB + reline: https://github.com/jruby/jruby/issues/1372
Result of irb_info
irb(main):001:0> irb_info
=>
Ruby version: 2.6.5
IRB version: irb 1.3.4 (2021-02-25)
InputMethod: ReidlineInputMethod with Reline 0.2.4
RUBY_PLATFORM: java
Terminal Emulator
I am using MacOS Terminal.
Setting Files
No setting files.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Use the irb+reline branch from https://github.com/jruby/jruby/pull/5803 and reproduce the backspace and repeated-prompt behavior on JRuby. Compare IRB, Reline, and the FFI-based io-console path, starting with the io-console tests and the referenced JRuby issue; done means identifying the responsible component and covering both reported behaviors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100