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

Readline options? #510

Open
MSP-Greg opened this issue Nov 19, 2018 · 10 comments · May be fixed by #615
Open

Readline options? #510

MSP-Greg opened this issue Nov 19, 2018 · 10 comments · May be fixed by #615

Comments

@MSP-Greg
Copy link
Collaborator

JFYI,

It was mentioned in Ruby core, another ruby implementation:
https://github.com/aycabta/reline

I did test it with the Ruby Core readline tests, and it did fail some tests (missing methods, etc).

I'd help with it, but given that I'm a Windows type, I don't really have a 'baseline' for how readline should work...

@deivid-rodriguez
Copy link
Owner

Your fork is good for Windows until some progress is made on the official libraries 👍

@MSP-Greg
Copy link
Collaborator Author

Sometime soon, I'll try it with byebug and see how the tests do...

@MSP-Greg
Copy link
Collaborator Author

Off topic - JFYI https://bugs.ruby-lang.org/issues/15313

@MSP-Greg
Copy link
Collaborator Author

Yesterday morning I ran tests with reline & ruby-head, some issues. Haven't torn thru your code, how do I get typical --verbose test output?

From my perspective, reline should work with byebug...

@deivid-rodriguez
Copy link
Owner

I think with TESTOPTS=--verbose?

Yeah, I think it should work too, but when I tried tests wouldn't run. I think it's some problem when shelling out with Open3 and passing user input to the subprocess.

@MSP-Greg
Copy link
Collaborator Author

First thing I tried. Dots...

IO.popen, Open3, etc. I've worked plenty with STDOUT & STDERR, but STDIN, no.

I've tried tests from time to time also. Also, I said 'reline should work with byebug'. I really think that reline can only be considered a replacement for readline when it works with byebug...

@deivid-rodriguez
Copy link
Owner

First thing I tried. Dots...

Try bin/minitest --verbose (not sure why the other option is not working).

It'd be great to get this working, indeed.

@MSP-Greg
Copy link
Collaborator Author

Duh. Looked at the code a bit

rake test --verbose

Back to frozen tests...

@MSP-Greg
Copy link
Collaborator Author

I worked a bit with reline using ruby-head, which I think is equivalent to reline master. Tests were intermittent, but sometimes all did pass. Used the following code for reline, most of which came from its test setup:

require 'reline'
Reline.send(:remove_const, :IOGate) if Reline.const_defined?(:IOGate)
Reline.const_set :IOGate, Reline::GeneralIO
Reline.core.config.instance_variable_set :@test_mode, true
Reline.core.config.reset
Reline.core.input = STDIN

@MSP-Greg
Copy link
Collaborator Author

MSP-Greg commented Nov 7, 2019

Using something similar to the above, CI is passing on Windows using reline. I'm considering this to be on hold until a determination is made as to reline's UI compatibility with Windows.

This was referenced Jan 18, 2020
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

Successfully merging a pull request may close this issue.

2 participants