Skip to content

Libraries that need to be gemified #6682

Open

Description

@headius

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:

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

Activity

  1. added this to the JRuby 9.4.0.0 milestone on May 24, 2021
  2. hsbt commented on Jun 7, 2021

    @hsbt

    👍 I'll support this.

  3. headius commented on Sep 3, 2021

    @headius
    MemberAuthor

    strscan gemification is started in ruby/strscan#25.

  4. headius commented on Sep 3, 2021

    @headius
    MemberAuthor

    See ruby/digest#20 / ruby/digest#21 for the gemification of Digest.

  5. headius commented on Sep 3, 2021

    @headius
    MemberAuthor

    stringio started in ruby/stringio#21

  6. hsbt commented on Sep 3, 2021

    @hsbt

    @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.

  7. headius commented on Sep 3, 2021

    @headius
    MemberAuthor

    @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"?

  8. headius commented on Sep 3, 2021

    @headius
    MemberAuthor

    @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.

  9. chrisseaton commented on Sep 3, 2021

    @chrisseaton
    Contributor
  10. headius commented on Sep 4, 2021

    @headius
    MemberAuthor

    @chrisseaton Thank you!

    @hsbt That's everyone!

  11. headius commented on Sep 4, 2021

    @headius
    MemberAuthor

    I will try to make sure the other PRs can get relicensed as well.

  12. changed the title [-]Native libraries that need to be gemified[/-] [+]Libraries that need to be gemified[/+] on Oct 1, 2021
  13. headius commented on Oct 1, 2021

    @headius
    MemberAuthor

    I have updated the description with a complete list of Ruby 3.0 gemified libraries and links to current issues and PRs.

  14. headius commented on Oct 1, 2021

    @headius
    MemberAuthor

    complete list

    At least a complete list of the gemified libraries that we could not trivially incorporate. Several like fileutils and rdoc already worked fine and have just been switched to default gems.

  15. removed this from the JRuby 9.4.0.0 milestone on Nov 17, 2022
  16. 12 remaining items

  17. adurgin commented on Jun 25, 2024

    @adurgin

    The english, net-ftp, net-http, net-protocol, securerandom, and weakref libraries are also now sourced from gems.

    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.

  18. headius commented on Jun 25, 2024

    @headius
    MemberAuthor

    @adurgin Good catch! I'll see about getting a PR into net-ftp to make it work on JRuby.

  19. headius commented on Jun 25, 2024

    @headius
    MemberAuthor

    @adurgin I've submitted a PR to net-ftp so we're just waiting for that to merge and release.

    ruby/net-ftp#38

  20. adurgin commented on Jun 25, 2024

    @adurgin

    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

  21. headius commented on Jun 26, 2024

    @headius
    MemberAuthor

    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.

  22. headius commented on Jun 26, 2024

    @headius
    MemberAuthor

    net-ftp updated in #8305

    This will merge into 9.4 and 10 once it's green.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions