Repository navigation
Libraries that need to be gemified #6682
Copy link
Copy link
Open
Milestone
Description
Updated: Many gems have been incorporated (on our 3.0 branch) and some are in progress, so I am updating this description to include a complete list of the remaining gems needed to match Ruby 3 (in JRuby 9.4). See #4875 for earlier discussion about gemification.
Default Gems, pure-ruby
Most of the pure-Ruby libraries have been updated to use the gems. The exceptions below may not install or may have other native library dependencies that do not yet support JRuby.
- english: refused to install through mavengems for some reason
- debug: out of sync in CRuby repo and missing JRuby tweaks
- net/ftp: tweaks for missing jruby-openssl functionality
- net/http: tweaks for JDK proxy properties
- net/protocol: depends on C extension gems that do not currently have JRuby support
- open3: we have custom logic that needs to be merged with the gem (Support JRuby ruby/open3#3)
readline: need to get JRuby support into readline-ext before we can remove our version(reline is all that's needed now)- resolv: needs some JRuby tweaks in the gem
- securerandom: we have a custom version that uses a native extension
set: ours is all native and needs to be merged with the gem(moved to core in Ruby 4)- tempfile: switching to the gem in JRuby 10 (Use gem for tempfile #7973)
- tmpdir: minor tweaks to our version that needed to be merged
- weakref: ours is all native and needs to be merged with the gem
Default gems, native extensions
All of these gems need native JRuby support, or some workaround:
- bigdecimal (Stub out extension build on JRuby ruby/bigdecimal#250)
- cgi (jruby support ruby/cgi#9)
- digest - we have our own impl (java version ruby/digest#20, jruby support ruby/digest#21)
- date
- dbm/gdbm (low priority, rarely used)
- etc (could possibly move to pure-FFI)
- fcntl (same)
- fiddle (not based on FFI)
- io-nonblock (Add TruffleRuby & JRuby in CI and use the correct fallback pattern for rb_io_descriptor() ruby/io-nonblock#12)
- io-wait (JRuby support ruby/io-wait#2)
- nkf (low priority)
- openssl (Stub gemspec for JRuby ruby/openssl#598)
- pathname
- readline-ext
- stringio (Import JRuby's stringio impl ruby/stringio#21)
- strscan (Import JRuby's strscan ruby/strscan#25)
- syslog
- win32ole
- zlib
Bundled gems, not default but with native requirements
- rbs: includes a large native extension for CRuby that we do not have
- typeprof: depends on rbs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity
hsbt commentedon Jun 7, 2021
👍 I'll support this.
headius commentedon Sep 3, 2021
strscan gemification is started in ruby/strscan#25.
headius commentedon Sep 3, 2021
See ruby/digest#20 / ruby/digest#21 for the gemification of Digest.
headius commentedon Sep 3, 2021
stringio started in ruby/stringio#21
hsbt commentedon Sep 3, 2021
@headius Thanks for your work! Did we get the approval for relicensing JRuby libraries that are this work at ruby/digest#21 (comment) ?
I'm not sure what we should get the approval for that each pull requests.
headius commentedon Sep 3, 2021
@hsbt I believe we got approval from everyone except @chrisseaton in that PR and updated my comment to be a checklist.
@chrisseaton You responded affirmatively to the PR, but could you add something along the lines of "I consent to having my contributions relicensed etc etc"?
headius commentedon Sep 3, 2021
@hsbt FWIW having talked with legal-ish folks about license changes, as long as everyone publicly states that they are ok with it that is generally enough, legally-speaking.
chrisseaton commentedon Sep 3, 2021
ruby/digest#21 (comment)
headius commentedon Sep 4, 2021
@chrisseaton Thank you!
@hsbt That's everyone!
headius commentedon Sep 4, 2021
I will try to make sure the other PRs can get relicensed as well.
[-]Native libraries that need to be gemified[/-][+]Libraries that need to be gemified[/+]headius commentedon Oct 1, 2021
I have updated the description with a complete list of Ruby 3.0 gemified libraries and links to current issues and PRs.
headius commentedon Oct 1, 2021
At least a complete list of the gemified libraries that we could not trivially incorporate. Several like
fileutilsandrdocalready worked fine and have just been switched to default gems.12 remaining items
adurgin commentedon Jun 25, 2024
net-ftp gem (version 0.1.3?) in 9.4 is missing a customization from 9.3 to comment out use of
session_new_cb. 9.3 has this comment block:# NOTE: session_cache_mode = has no effect on (current) JRuby-OpenSSL # @ssl_context.session_cache_mode = # OpenSSL::SSL::SSLContext::SESSION_CACHE_CLIENT | # OpenSSL::SSL::SSLContext::SESSION_CACHE_NO_INTERNAL_STORE # SSLSocket#session= does nothing with JRuby-OpenSSL # @ssl_context.session_new_cb = proc {|sock, sess| @ssl_session = sess }The current gem, 0.3.6, doesn't work either.
headius commentedon Jun 25, 2024
@adurgin Good catch! I'll see about getting a PR into net-ftp to make it work on JRuby.
Don't use OpenSSL session cache on JRuby
headius commentedon Jun 25, 2024
@adurgin I've submitted a PR to net-ftp so we're just waiting for that to merge and release.
ruby/net-ftp#38
adurgin commentedon Jun 25, 2024
Fantastic. Thank you.
For anyone else affected, I was able to work around it in the interim with a monkey patch of initialize.
In case one is better than the other, I did notice that net-http approached it in a slightly different way: https://github.com/ruby/net-http/blob/master/lib/net/http.rb#L1681
headius commentedon Jun 26, 2024
net-ftp 0.3.7 has been released with a fix! I'll update JRuby to ship that where appropriate and we should be good to go.
headius commentedon Jun 26, 2024
net-ftp updated in #8305
This will merge into 9.4 and 10 once it's green.