Skip to content
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

JRuby support that is not a no-op #7

Open
headius opened this issue Oct 29, 2021 · 10 comments
Open

JRuby support that is not a no-op #7

headius opened this issue Oct 29, 2021 · 10 comments

Comments

@headius
Copy link

headius commented Oct 29, 2021

JRuby would like to support this gem directly (rather than passively), but currently it has a dependency on the rbtree gem which has a C extension.

First off, thanks very much for thinking of JRuby and releasing -java versions of the gem that do not have the rbtree dependency and that just utilize our existing SortedSet implementation! We appreciate your consideration!

We do, however, want to match CRuby and stop shipping our own implementation of SortedSet, so I see two options going forward:

  • Include our Java implementation of SortedSet inside the -java version of the sorted_set gem.
  • Release a -java version of the rbtree gem and enable your version of SortedSet on JRuby.

We would prefer to do the latter, for ease of maintenance, but I thought we should start the discussion here.

There may be performance considerations... the existing JRuby SortedSet is based on the JDK's TreeSet class, which has been optimized for this purpose.

Copying @kares as he did the native port of the set library in JRuby.

@headius
Copy link
Author

headius commented Oct 29, 2021

As far as I can tell there is no active repository for the rbtree gem so I am unsure how to proceed here. It may not be a good idea to rely on this gem unless it has a public repository and an active maintainer.

@headius
Copy link
Author

headius commented Jan 18, 2022

Ping again... in order for this gem to support JRuby natively, so we can remove our built-in SortedSet, the following tasks need to happen:

  • rbtree needs an official public repository. The existing gem links to a defunct rubyforge URL.
  • rbtree needs native JRuby support. This would be the best path forward since it would add native JRuby support to rbtree and support the sorted_set gem without any modifications.

I would be willing to work with some of our contributors to implement a JRuby-native rbtree, but the repository issue needs to be fixed first. The sorted_set gem should not depend on rbtree unless there's a public rbtree repository somewhere.

@headius
Copy link
Author

headius commented Nov 3, 2022

Ping again. We have outstanding work items to remove our sorted set implementation but we can't until this gem directly supports JRuby. I have listed the two possible options in the description. Can you help us?

@headius
Copy link
Author

headius commented Nov 3, 2022

@hsbt is there anything you can do to help move this forward? It still depends on the rbtree gem that does not have a public repository. I don't think this is a good situation.

@hsbt
Copy link

hsbt commented Nov 14, 2022

@headius pong. Thanks for your mention. At first, I'm understanding this issue.

@headius
Copy link
Author

headius commented Nov 15, 2022

@hsbt The main problem is that this gem depends on the rbtree gem which has no public sources anymore (old repository was on RubyForge).

The secondary problem is JRuby support: we could add what we have (using JDK classes) or add JRuby support to rbtree if the sources were made public again.

@headius
Copy link
Author

headius commented Feb 6, 2023

Another release of JRuby will go out this week without being able to remove SortedSet from our core. We still need access to the rbtree sources in order to support the sorted_set gem.

@headius
Copy link
Author

headius commented May 23, 2023

I am bumping this again from JRuby 9.4.3 to 9.4.4. We would still like to be able to support this gem but the following needs to happen:

  • rbtree needs an official public repository. The existing gem links to a defunct rubyforge URL.
  • rbtree needs native JRuby support. This would be the best path forward since it would add native JRuby support to rbtree and support the sorted_set gem without any modifications. I can easily add support once the rbtree repository is public.

@hsbt
Copy link

hsbt commented May 25, 2023

rbtree is available with https://github.com/mame/rbtree and @mame can push https://rubygems.org/gems/rbtree.

@headius
Copy link
Author

headius commented Oct 11, 2023

@hsbt Thank you! I will try to add JRuby support.

headius added a commit to headius/rbtree that referenced this issue Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants