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

IRB: arrow keys to move along cmd line and up/down in history not working on Windows #4141

Closed
ssteidte opened this Issue Sep 7, 2016 · 22 comments

Comments

Projects
None yet
8 participants
@ssteidte

ssteidte commented Sep 7, 2016

Environment

Provide at least:

  • JRuby from 9.1.3 on, including .4 and .5
  • Windows

Expected Behavior

  • in IRB, arrow keys move the cursor along the cmd line or get previous/next line in history

Actual Behavior

  • while working on Linux, this has ceased working on Windows
  • there is just no action when one of the arrow keys is pressed
@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 7, 2016

Member

This must be due to the ^C fix we did in 9.1.3 for #3721.

I don't know why it would cause this, though :-(

Member

headius commented Sep 7, 2016

This must be due to the ^C fix we did in 9.1.3 for #3721.

I don't know why it would cause this, though :-(

@headius headius added this to the JRuby 9.1.6.0 milestone Sep 7, 2016

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 7, 2016

Member

A workaround for you: I believe if you install the 1.0 jruby-readline gem from here you'll restore the old behavior.

@mkristian Perhaps it's time we made jruby-readline a real rubygems.org gem, so it's easier for folks to up/downgrade it as we make fixes.

Member

headius commented Sep 7, 2016

A workaround for you: I believe if you install the 1.0 jruby-readline gem from here you'll restore the old behavior.

@mkristian Perhaps it's time we made jruby-readline a real rubygems.org gem, so it's easier for folks to up/downgrade it as we make fixes.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 7, 2016

Member

Drat...installing the 1.0 gem does not seem to fix the problem. I'll look into this today.

Member

headius commented Sep 7, 2016

Drat...installing the 1.0 gem does not seem to fix the problem. I'll look into this today.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 7, 2016

Member

Ok, here's a working workaround:

  1. gem install that 1.0 jruby-readline gem
  2. delete readline.jar from /lib/ruby/stdlib
Member

headius commented Sep 7, 2016

Ok, here's a working workaround:

  1. gem install that 1.0 jruby-readline gem
  2. delete readline.jar from /lib/ruby/stdlib
@cmichon

This comment has been minimized.

Show comment
Hide comment
@cmichon

cmichon Sep 8, 2016

The jar replacement fixes the issue. I agree the jruby-readline should become a real gem as otherwise this will remain a dirty fix.

cmichon commented Sep 8, 2016

The jar replacement fixes the issue. I agree the jruby-readline should become a real gem as otherwise this will remain a dirty fix.

@tobymurray-nanometrics

This comment has been minimized.

Show comment
Hide comment
@tobymurray-nanometrics

tobymurray-nanometrics Sep 16, 2016

Would this also impact pasting content? I'm seeing some extremely weird behavior there, although I haven't tried to isolate JRuby from all the other tools which might be impacting it.

tobymurray-nanometrics commented Sep 16, 2016

Would this also impact pasting content? I'm seeing some extremely weird behavior there, although I haven't tried to isolate JRuby from all the other tools which might be impacting it.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 21, 2016

Member

@tobymurray-nanometrics On Windows? It certainly could.

Member

headius commented Sep 21, 2016

@tobymurray-nanometrics On Windows? It certainly could.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 21, 2016

Member

@mkristian I tried to release a 1.1.1 gem with the regression reverted, but I'm not sure it's building the gem appropriately for rubygems.org. I can install the gem, but attempting to activate it produces the following error:

[] ~/projects/jruby-readline $ gem install jruby-readline
Successfully installed jruby-readline-1.1.1-java
1 gem installed

[] ~/projects/jruby-readline $ jruby -v -e 'gem "readline"; require "readline"'
jruby 9.1.4.0 (2.3.1) 2016-09-01 2e1327f Java HotSpot(TM) 64-Bit Server VM 25.92-b14 on 1.8.0_92-b14 +jit [darwin-x86_64]
Gem::MissingSpecError: Gem::MissingSpecError
  to_specs at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/dependency.rb:308
   to_spec at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/dependency.rb:320
       gem at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/core_ext/kernel_gem.rb:65
    <main> at -e:1

I believe it should be possible to put out a release of the gem, and get existing JRuby versions to load it by using gem install --default jruby-readline combined with gem install jruby-readline in some order, but this indicates it's simply not loading right.

Member

headius commented Sep 21, 2016

@mkristian I tried to release a 1.1.1 gem with the regression reverted, but I'm not sure it's building the gem appropriately for rubygems.org. I can install the gem, but attempting to activate it produces the following error:

[] ~/projects/jruby-readline $ gem install jruby-readline
Successfully installed jruby-readline-1.1.1-java
1 gem installed

[] ~/projects/jruby-readline $ jruby -v -e 'gem "readline"; require "readline"'
jruby 9.1.4.0 (2.3.1) 2016-09-01 2e1327f Java HotSpot(TM) 64-Bit Server VM 25.92-b14 on 1.8.0_92-b14 +jit [darwin-x86_64]
Gem::MissingSpecError: Gem::MissingSpecError
  to_specs at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/dependency.rb:308
   to_spec at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/dependency.rb:320
       gem at /Users/headius/.rvm/rubies/jruby-9.1.4.0/lib/ruby/stdlib/rubygems/core_ext/kernel_gem.rb:65
    <main> at -e:1

I believe it should be possible to put out a release of the gem, and get existing JRuby versions to load it by using gem install --default jruby-readline combined with gem install jruby-readline in some order, but this indicates it's simply not loading right.

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Sep 21, 2016

Member

jruby-readline 1.1.1 released to rubygems and maven. The current workaround is

  1. gem install jruby-readline
  2. delete readline.jar from /lib/ruby/stdlib
Member

headius commented Sep 21, 2016

jruby-readline 1.1.1 released to rubygems and maven. The current workaround is

  1. gem install jruby-readline
  2. delete readline.jar from /lib/ruby/stdlib
@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Nov 8, 2016

Member

This is still outstanding. @enebo: Should we revert the change to jruby-readline and release 9.1.6.0 with the reverted version?

Member

headius commented Nov 8, 2016

This is still outstanding. @enebo: Should we revert the change to jruby-readline and release 9.1.6.0 with the reverted version?

@enebo

This comment has been minimized.

Show comment
Hide comment
@enebo

enebo Nov 8, 2016

Member

@headius I feel this is more annoying than what happened in #3721 so yeah reverting feels like the lesser of two evils. I also hate second-classing windows users so perhaps this is a nice gesture :)

Member

enebo commented Nov 8, 2016

@headius I feel this is more annoying than what happened in #3721 so yeah reverting feels like the lesser of two evils. I also hate second-classing windows users so perhaps this is a nice gesture :)

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Nov 8, 2016

Member

This is fixed with the release of jruby-readline-1.1.1, and jruby-9.1.6.0 release today will ship that.

Member

headius commented Nov 8, 2016

This is fixed with the release of jruby-readline-1.1.1, and jruby-9.1.6.0 release today will ship that.

@headius headius closed this Nov 8, 2016

@headius headius modified the milestones: JRuby 9.1.6.0, JRuby 9.2.0.0 Nov 8, 2016

@hathawad

This comment has been minimized.

Show comment
Hide comment
@hathawad

hathawad Nov 11, 2016

I can confirm this is fixed on Windows w/ jruby-9.1.6.0

hathawad commented Nov 11, 2016

I can confirm this is fixed on Windows w/ jruby-9.1.6.0

@hathawad

This comment has been minimized.

Show comment
Hide comment
@hathawad

hathawad Mar 22, 2018

This issue seems to be back w/ jruby-9.1.16.0

hathawad commented Mar 22, 2018

This issue seems to be back w/ jruby-9.1.16.0

@hathawad

This comment has been minimized.

Show comment
Hide comment
@hathawad

hathawad Apr 5, 2018

This is broken again on Windows w/ jruby-9.1.16.0
@headius do we need new issue, or should we reopen this one?

hathawad commented Apr 5, 2018

This is broken again on Windows w/ jruby-9.1.16.0
@headius do we need new issue, or should we reopen this one?

@hathawad

This comment has been minimized.

Show comment
Hide comment
@hathawad

hathawad Apr 9, 2018

FYI this work around seems to be working (taken in part from above in this thread):

  1. gem install jruby-readline
  2. copy readline.jar from gem installation to lib\ruby\stdlib

hathawad commented Apr 9, 2018

FYI this work around seems to be working (taken in part from above in this thread):

  1. gem install jruby-readline
  2. copy readline.jar from gem installation to lib\ruby\stdlib
@mkristian

This comment has been minimized.

Show comment
Hide comment
@mkristian

mkristian Apr 10, 2018

Member

@hathawad may I ask which version of jruby-readline you are using ? as the version from jruby-9.1.16 should be the same (binary compatible) as jruby-readline-1.1.1

Member

mkristian commented Apr 10, 2018

@hathawad may I ask which version of jruby-readline you are using ? as the version from jruby-9.1.16 should be the same (binary compatible) as jruby-readline-1.1.1

@rob99

This comment has been minimized.

Show comment
Hide comment
@rob99

rob99 May 25, 2018

@hathawad may I ask which version of jruby-readline you are using ?

I had the same problem as @hathawad - it's the jruby-9.1.16.0\lib\ruby\stdlib\readline.jar "version" i.e. the standard lib not the gem. Replacing this jar with the one from the gem install fixes it.

rob99 commented May 25, 2018

@hathawad may I ask which version of jruby-readline you are using ?

I had the same problem as @hathawad - it's the jruby-9.1.16.0\lib\ruby\stdlib\readline.jar "version" i.e. the standard lib not the gem. Replacing this jar with the one from the gem install fixes it.

@cmichon

This comment has been minimized.

Show comment
Hide comment
@cmichon

cmichon May 25, 2018

cmichon commented May 25, 2018

@mkristian

This comment has been minimized.

Show comment
Hide comment
@mkristian

mkristian Jun 2, 2018

Member

@headius what is the take on this one here. are we going back to version 1.1.1 or wit until we get a reimplementation of readline ? can not remember the problems we resurrect with downgrading to 1.1.1

Member

mkristian commented Jun 2, 2018

@headius what is the take on this one here. are we going back to version 1.1.1 or wit until we get a reimplementation of readline ? can not remember the problems we resurrect with downgrading to 1.1.1

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius Jun 2, 2018

Member

@hathawad Could you open a new issue please? We want to keep the lineage of what was "fixed" when, even if it regresses.

Member

headius commented Jun 2, 2018

@hathawad Could you open a new issue please? We want to keep the lineage of what was "fixed" when, even if it regresses.

@hathawad

This comment has been minimized.

Show comment
Hide comment
@hathawad

hathawad commented Jun 2, 2018

Sure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment