You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Simplest option would be a no-op when installing on RUBY_ENGINE != "ruby".
Other options of varying effort:
Migrate the JRuby extension here and release a -java gem that uses it. This would become the new home for those sources.
Introduce the pure-Ruby version as a fallback for all platforms when the extension cannot be built or the platform has opted out of C extensions.
The primary issue here, as with all the stdlib gems, is when they are a transitive dependency. As in the case of jruby/jruby#6144, if a library is released with a dependency on a newer version of this gem, and the gem cannot install on JRuby, then the original library also cannot install on JRuby. We need to avoid that for every stdlib gem that JRuby can possibly support.
FWIW, the bulk of the code for JRuby's strscan lives here:
Activity
headius commentedon Sep 29, 2020
Thank you for opening this, @marcandre 👍
Simplest option would be a no-op when installing on RUBY_ENGINE != "ruby".
Other options of varying effort:
The primary issue here, as with all the stdlib gems, is when they are a transitive dependency. As in the case of jruby/jruby#6144, if a library is released with a dependency on a newer version of this gem, and the gem cannot install on JRuby, then the original library also cannot install on JRuby. We need to avoid that for every stdlib gem that JRuby can possibly support.
FWIW, the bulk of the code for JRuby's strscan lives here:
https://github.com/jruby/jruby/blob/master/core/src/main/java/org/jruby/ext/strscan/RubyStringScanner.java
The parent directory has the rest of the extensions we ship as builtin libraries, all of which are likely candidates for moving to gems.
kou commentedon Sep 30, 2020
OK. Let's work on "Migrate the JRuby extension here and release a -java gem that uses it. This would become the new home for those sources".
headius commentedon Sep 30, 2020
Ok, I am looking into this today and we will discuss the implications on our matrix chat at https://matrix.to/#/#jruby:matrix.org