Comments (14)
Upgrade to highline 2.0 resolved the issue, thanks!
from highline.
FWIW I've been using the 2.0 development releases for JRuby compatibility for a long time.
from highline.
@headius right it is unlikely the path will change again. but it is more likely we switch to jline-3.0 one day. and current jline-3.0 has a dependency to asm which is also something jruby puts into a relocated package.
from highline.
@abinoam cool - FYI gems with native extension do not work with JRuby. Thanks for looking into all this.
from highline.
One more good new. The gem that the issue is refereeing is https://github.com/gooddata/gooddata-ruby
Having a fast look at it, it seem it is already ready for HighLine 2.0. Just because it used "best practices". It envelopes Highline use behind a local reference. Just the way HighLine 2 favors!
require 'highline'
# Define GoodData::CLI as GLI Wrapper
module GoodData
module CLI
DEFAULT_TERMINAL = HighLine.new unless const_defined?(:DEFAULT_TERMINAL)
class << self
def terminal
DEFAULT_TERMINAL
end
end
end
end
Then it uses it like this at https://github.com/gooddata/gooddata-ruby/blob/2bd53792728329d380d96a8358cc734359c14fd5/lib/gooddata/commands/auth.rb#L45
# Read environment
environment = GoodData::CLI.terminal.ask('Environment') do |q|
set_default_value(q, old_credentials[:environment], GoodData::Project::DEFAULT_ENVIRONMENT)
end
So, it seems it will probably work out of the box with HighLine 2.0 (at least for this specific gem).
from highline.
@abinoam many thanks for your help, I have already asked our developers to migrate to highline 2.0. I will notify the result.
from highline.
I let this up to you (@headius @mkristian) to decide what is best approach for JRuby, I think it will be easy to make Highline compatible with it 👍
PS: I'll probably have time to work on this by monday.
from highline.
Hi @headius,
I'm seeing now that the issue is referring to 1-7-stable branch.
These "system extensions" have gone in 2.0 (unreleased).
I'll try to have a better look at it.
from highline.
@tomdz Could you help on this? I saw the JRuby/jline code was made initially by you.
Hooking some other folks that could also probably help: @BanzaiMan, @ai, @presidentbeef, @rsutphin, @mnzaki, @iconoclast.
from highline.
just to get the initial context is play as it could be 1-7-branch related: jruby/jruby#4889
from highline.
just to get the initial context is play as it could be 1-7-branch related: jruby/jruby#4889
The stack trace shows that @petrvalkoun-gooddata is on 1.7.10.
initialize_system_extensions at C:/jruby/lib/ruby/gems/shared/gems/highline-1.7.10/lib/highline/system_extensions.rb:21
from highline.
Hi all,
I've run bundle exec rake acceptance
and the readline autocomplete test worked ok on 2.0.0-pre.
I've made some simple tests on questions with readline enabled and it's woking ok on 2.0.0-pre
What about just ask @petrvalkoun-gooddata and everybody willing to keep running the most update version of JRuby to migrate his code to highline 2.0? What do you think?
By the way, I think I've postponing the 2.0 release too much. I'm waiting for feedback from people that must have their software affected by the release. But, well, I understand how hard it is to deal with legacy software. This issue afffecting JRuby is the fuel that I need to officially release 2.0.
Releasing it will push everybody that haven't set version constraints at their gemspec/Gemfiles to the most up to date HighLine version. I mean, if HighLine 2.0 was already released, perhaps this JRuby/HighLine issue wouldn't even be noticed.
Houston (@JEG2)? Agree? Release 2.0? 9, 8, 7, ...
PS:
I've had some issues trying to bundle install at 2.0.0-develop with JRuby.
Gem rugged didn't compile native extensions.
bundle install --without code_quality
for the rescue. As we don't need those gems to run the tests.
from highline.
gems with native extension do not work with JRuby.
It is a pronto
dependency.
I'll see if I can fine tune the gemspec|Gemfile so it autodetects this.
Thanks 👍
from highline.
I'm closing this! 👍
from highline.
Related Issues (20)
- Docs not on RubyDoc.info as README states HOT 2
- Proc validation displays ruby object on invalid HOT 8
- Incosistent behavior when ask with a validator and readline=true HOT 9
- undefined method 'default_instance' HOT 3
- Default Highline Example on GithubGives Error HOT 5
- HighLine Terminal::IOConsole#restore_mode does not work with StringIO HOT 3
- consider exposing Readline.completion_proc via HighLine::Question#selection HOT 3
- default value has to be a string HOT 14
- Ctrl-C improperly handled when q.echo = false HOT 6
- Issues with echo: false and not on TTY HOT 7
- Can't get terminal_size HOT 11
- echo=false or echo='*' requires extra character after enter on Windows HOT 6
- Possible to accept multiple selections with `.in` and `.default`? HOT 5
- test failing when ruby is built against libedit instead of readline HOT 3
- Have to set convert type in order for `.in` to work with array
- 2.1.0 was released, but tag is missing in repository HOT 2
- Make Highline Ruby 3.3 and reline compatible HOT 1
- Update tests for Reline (as the substitute of Readline)
- Add `abbrev` to gemspec HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from highline.