Skip to content

JRuby support - #2

Merged
nobu merged 14 commits into
ruby:masterfrom
headius:jruby
Feb 3, 2022
Merged

JRuby support#2
nobu merged 14 commits into
ruby:masterfrom
headius:jruby

Conversation

@headius

Copy link
Copy Markdown
Contributor

This imports the JRuby code for io/wait, with tests green (see caveat) and hooked up to CI.

One test is skipped on JRuby due to jruby/jruby#6852, which will be fixed in JRuby 9.3.1.0.

This support is needed to release a JRuby-specific io-wait gem, a dependency of net-protocol. Without JRuby support in this gem we can't use any of the other net* gems.

@headius

Copy link
Copy Markdown
ContributorAuthor

I have no idea why the JRuby jobs are stuck.

Comment threadRakefile
Comment threadlib/io/wait.rb Outdated
@headius

Copy link
Copy Markdown
ContributorAuthor

I have pushed the missing bits for JRuby and rebased on current master.

Additional changes from previous review:

  • Rakefile tweaks to get paths set properly for JRuby, with the JRuby-specific wait.rb moved under ext/java/lib.
  • Gemspec tweaks to include lib/io/wait.jar and the Java ext files in the gem

This addresses both of @ahorek's review comments. I also tested that the built gem can install and replace the builtin io/wait in JRuby.

So it is pretty close now.

Comment thread.github/workflows/jruby.yml Outdated
@headius

Copy link
Copy Markdown
ContributorAuthor

Something is still not right with the JRuby builds.

@olleolleolle

Copy link
Copy Markdown
Contributor

is it missing a bundle exec before rake?

@headius

headius commented Nov 30, 2021

Copy link
Copy Markdown
ContributorAuthor

There are no dependencies for CRuby (dev or otherwise) so no bundling is done in any of the builds.

I will add the necessary bits for JRuby.

@headius

Copy link
Copy Markdown
ContributorAuthor

Looks like we have a winner!

This can be squashed during merge, or if preferred I can rewrite the commits to better reflect the changes I made.

@headius

Copy link
Copy Markdown
ContributorAuthor

Pinging maintainers... I believe this is ready to merge and is necessary for JRuby 9.4 to source io-wait (and the net/* libraries that use it) from the gems. High priority for JRuby 9.4 release in the next month or two.

Comment threadRakefile Outdated
@headiusheadius mentioned this pull request Jan 27, 2022
@headius

Copy link
Copy Markdown
ContributorAuthor

I have updated this from master again. Is there anything else needed to merge?

@headius

Copy link
Copy Markdown
ContributorAuthor

The omitted test has been un-omitted, since that issue was fixed in JRuby 9.3.1.0 (current is 9.3.3.0).

@headius

Copy link
Copy Markdown
ContributorAuthor

I rebased this on master and it will merge now. I'm fine with merge commit or squashed.

Comment threadext/java/org/jruby/ext/io/wait/IOWaitLibrary.java

@nobunobu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines seem unnecessary.

Comment threadtest/io/wait/test_io_wait_uncommon.rb Outdated
Comment threadGemfile Outdated
Comment thread.gitignore Outdated
Comment threadRakefile Outdated
headiusand others added 2 commits February 2, 2022 09:02
@headius

Copy link
Copy Markdown
ContributorAuthor

I have addressed all review comments.

hsbt
hsbt approved these changes Feb 3, 2022
Comment threadRakefile Outdated
Comment threadio-wait.gemspec Outdated
* use case/when for chained ifs
* include only necessary files for JRuby
nobu
nobu approved these changes Feb 3, 2022
@nobu
nobu merged commit d182718 into ruby:masterFeb 3, 2022
@hsbt

hsbt commented Feb 3, 2022

Copy link
Copy Markdown
Member

🎉

@headius
headius deleted the jruby branch February 3, 2022 13:36
@headius

Copy link
Copy Markdown
ContributorAuthor

Thank you both!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@headius@olleolleolle@hsbt@nobu@eregon@ahorek