-
Notifications
You must be signed in to change notification settings - Fork 69
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
Is it possible to unconstrain strscan or fallback if not available? #132
Comments
Sorry, just saw #131 which is exactly what prompted this issue on our end. Feel free to close, but I'm still curious about the questions I raised. Thanks. |
@naitoh Can we use old strscan? See also: #105 (comment) |
I've implemented this. |
I fixed the problem with So you will need to use StringScanner that incorporates this fix, but I think f1df7d1 should be fine. However, I am concerned about the impact of the ruby/strscan#79 modification on JRuby, is that a problem? See: https://github.com/ruby/rexml/pull/105/files#r1451192655 |
I think that JRuby users can use the latest strscan or upgrade JRuby itself. strscan gem for JRuby is a fat gem. So JRuby users don't need to build it. |
OK. |
Hello, as I understand it, strscan is a standard gem which means Ruby will always include some version of it. One can update the version via gem, but then it must be compiled on the target system as it isn't provided as a binary gem.
Recent versions of strscan seem to require a Ruby compiled with libonig support[1], which may not be available. If I'm understanding all of this correctly, this effectively limits the kinds of Ruby installs where rexml can be used.(EDIT: I misinterpreted log output. libonig is optional. As mentioned here, workarounds include ensuringbuild-essential
is installed (gcc and make) or using an earlier version of rexml as mentioned below.)If your gem directly requires rexml, the easiest way to get around this is to require an earlier version of rexml that doesn't use strscan (e.g., 3.2.6). This isn't a great solution as we miss out on updates. And if rexml is further down the dependency chain, even this may not be viable.
Apologies if I'm off the mark. By no means a Ruby expert.
[1] https://github.com/ruby/strscan/blob/ca66d48c47d2b17753a660c628606f0bf788d594/ext/strscan/extconf.rb#L5-L6The text was updated successfully, but these errors were encountered: