-
Notifications
You must be signed in to change notification settings - Fork 137
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
highline 1.6.9 hangs indefinitely with JRuby #31
Comments
In understand. However, this is an old JRuby and we're just talking about the tests, right? Does the library still work or is it also broken? |
Not sure since I only tried the tests, and I don't have a clear test case for the code. I'm doing this testing so that I can add the new version to Gentoo Linux. I can understand if you want to put this on hold until we upgrade to a new jruby version. |
Yeah, I actually think that may be older than what we now support. We use JLine under the hood and I can't seem to find when that was added to JRuby, but I believe it's recent-ish. We couldn't really find another working option for JRuby support, so I think we need it unless someone offers up another solution. |
jline seems to have been in JRuby since about 1.6.0 or 1.6.1 (april 2011). Would it be more better if highline has its own jline bundled ? I.e. a highline-java version that includes jline (similar to jruby) ? |
That might be an option. Would JLine run on the older JRuby versions? |
I don't think jline integration needs a lot of jruby features, so it should work with, say, 1.5.6. Bigger problem is the bundling - the jline jar itself is somewhat big, so a highline-java or even highline-jruby-old variant (since with 1.6.x the separate jar is not needed anymore) might be a good idea ? |
Yeah, this is sounding like some hassle to support some pretty old stuff. I'm feeling like it's not worth the bother. Do you guys disagree? |
It looks like our jruby 1.5.6 already has jline support. Also, with that version all tests pass for highline 1.6.8 pass. So unless something changed accordingly in highline 1.6.9 it may still be another problem. In any case I'm fine with postponing this until we can test with jruby 1.6. |
OK, closing this for now. |
Okay I think I found the problem. The test contains:
Unfortunately, in the case of JRUBY, the two parameters are ignored:
simply using |
This issue should probably be re-opened because this hang still happens with jruby 1.6.7.2 (ruby-1.8.7-p357) (2012-05-17 fffffff) (OpenJDK 64-Bit Server VM 1.6.0_24) [linux-amd64-java] |
Forgot to add that this still happens with highline 1.6.13. |
I'll try to look into this when I have some time. |
I have faced this problem while working on the jruby 1.7 support. I have made some preliminary changes that will alleviate the hang, but 18 tests fail. |
Yeah, that sounds reasonable. I would welcome such a fix. |
Before this commit, the input and output parameters to HighLine.new were ignored for #ask (both for specifying the input stream and for displaying the prompt). This commit fixes issue JEG2#31, which was introduced by PR JEG2#27. Since then, the HighLine tests have been unable to run on JRuby. With this change, the tests run on JRuby 1.7.3 but many of them fail. No tests fail on JRuby 1.7.3 using the version of HighLine from immediately before JEG2#27 was merged, so it seems likely the failures were caused by JEG2#27 also. This commit stops using `SystemExtensions#initialize` to set up JLine. It would have been possible to pass the input and output parameters to the `super` call, but that seemed to me like an abuse of inheritance. Instead, following the pattern of the rest of SystemExtensions, I added a method called `initialize_system_extensions` which is defined on a per-platform basis (currently for JRuby only) and invoked by `HighLine#initialize` when present.
It seems io/console is available on recent vesions of JRuby and it works pretty similar to how it works on MRI. The test suit just 'skips' the readline cases when at jruby. Because I couldn't figured out a way to test them. (If you know how to do it, please tell me so). But you can be sure that it is working fine by using By skipping this particular readline case on test suit we have all tests passing in travis https://travis-ci.org/abinoam/highline (jruby-19mode) Could you people interested in (and familiar to) JRuby support give some feedback about the PR #149 ? Hooking anyone that has commented in any HighLine JRuby issue: @rsutphin @mnzaki @graaff @Flameeyes @tomdz @andlaz @jeremyd @rsutphin @kgx @thinkgareth @presidentbeef @JEG2 @alexch @stomar @BanzaiMan @ai @celeduc @oreoshake @antond @jcoyne @keshavkuruva @cfbrobak @astounding |
After PR #149 I think most of JRuby problems are gone. Closing. |
With jruby 1.5.6 (ruby 1.8.7 patchlevel 249) (2012-01-08 6586) (OpenJDK 64-Bit Server VM 1.6.0_22) [amd64-java] tests hang indefinitely. I've tested both with and without your patch for my ruby 1.8 bug. It shows two dots when running its tests and then hangs. I realize that our jruby is old but we can't currently upgrade since 1.6 versions don't run properly on our system.
The text was updated successfully, but these errors were encountered: