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

Add JRuby extension to the gem #15

Merged
merged 4 commits into from
Jan 22, 2024
Merged

Add JRuby extension to the gem #15

merged 4 commits into from
Jan 22, 2024

Conversation

headius
Copy link
Contributor

@headius headius commented Jan 19, 2024

This pulls in the nkf extension implementation from JRuby. The build and load logic has been updated along the same lines as ruby/digest and the gem appears to build correctly for the -java platform.

Fixes #13

This pulls in the nkf extension implementation from JRuby. The
build and load logic has been updated along the same lines as
ruby/digest and the gem appears to build correctly for the -java
platform.

Fixes ruby#13
@headius
Copy link
Contributor Author

headius commented Jan 19, 2024

@hsbt @mrkn I believe I have made the same changes here as in digest, other than adding JRuby to tests (I am not sure we pass them all and run a very old version in our repository).

@mrkn
Copy link
Member

mrkn commented Jan 19, 2024

I think you need to confirm @nurse's opinion about this.

@nurse
Copy link
Member

nurse commented Jan 19, 2024

I think you need to confirm @nurse's opinion about this.

Thank you for mentioning me. I commented that I agree to merge an implementation for JRuby somewhere.

The pack deprecation does not have a suitable replacement, so it
will need some changes in JRuby 9.6(?).
@headius
Copy link
Contributor Author

headius commented Jan 19, 2024

I think you need to confirm @nurse's opinion about this.

Oops, sorry. Github suggested you but I should have checked actual maintainers.

@headius
Copy link
Contributor Author

headius commented Jan 19, 2024

Tests are running and green.

The only tricky part with these -java gems is that we really need them both to be pushed every time. The JRuby team is happy to maintain the Java code and help with releases. I'm not sure if @nobu or @hsbt have suggestions for how to make sure we always push both (other stdlib gems are doing this too).

@headius headius requested review from hsbt and nurse January 19, 2024 02:10
headius added a commit to headius/jruby that referenced this pull request Jan 19, 2024
JRuby's implementation is moving to the gem:

ruby/nkf#15

This won't happen until 3.4 compatibility and this should be
rebased on our 3.4 branch when available.
headius added a commit to headius/jruby that referenced this pull request Jan 19, 2024
JRuby's implementation is moving to the gem:

ruby/nkf#15

This won't happen until 3.4 compatibility and this should be
rebased on our 3.4 branch when available.
@@ -0,0 +1,59 @@
/***** BEGIN LICENSE BLOCK *****
* Version: EPL 2.0/GPL 2.0/LGPL 2.1
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can just drop GPL altogether. EPL (business-friendly) + LGPL (GPL-compatible) should cover every case we need. Would that be ok?

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have removed GPL (we know it scares people and have considered removing it from JRuby too) and added the additional JRuby licenses to the java gem.

nkf.gemspec Outdated

if Gem::Platform === spec.platform and spec.platform =~ 'java' or RUBY_ENGINE == 'jruby'
spec.platform = 'java'
spec.licenses = ["EPL-2.0", "LGPL-2.1"]
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
spec.licenses = ["EPL-2.0", "LGPL-2.1"]
spec.licenses += ["EPL-2.0", "LGPL-2.1"]

Sorry to nit-picking. gemspec or some files are distributed by Ruby or BSD-2-Clause.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops, that was supposed to be +=. Will fix.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed in latest push.

@headius
Copy link
Contributor Author

headius commented Jan 21, 2024

I think everything on my end is ready. @hsbt @nurse Anything else needed?

@hsbt hsbt merged commit 276afe6 into ruby:master Jan 22, 2024
21 checks passed
@hsbt
Copy link
Member

hsbt commented Jan 22, 2024

@headius I'll cut of new version from master branch today.

@flavorjones
Copy link

Thank you all for doing this work! ❤️

headius added a commit to headius/jruby that referenced this pull request Jan 22, 2024
JRuby's implementation has moved to the gem:

ruby/nkf#15

The nkf library has been a default gem in CRuby since 3.0; this
aligns 9.4 with that configuration. The gem will either move to
bundled or out of stdlib altogether in Ruby 3.4 later this year,
so I think we should take this step now.
headius added a commit to headius/jruby that referenced this pull request Jan 22, 2024
JRuby's implementation has moved to the gem:

ruby/nkf#15

The nkf library has been a default gem in CRuby since 3.0; this
aligns 9.4 with that configuration. The gem will either move to
bundled or out of stdlib altogether in Ruby 3.4 later this year,
so I think we should take this step now.
headius added a commit to headius/jruby that referenced this pull request Jan 23, 2024
JRuby's implementation has moved to the gem:

ruby/nkf#15

The nkf library has been a default gem in CRuby since 3.0; this
aligns 9.4 with that configuration. The gem will either move to
bundled or out of stdlib altogether in Ruby 3.4 later this year,
so I think we should take this step now.
@headius headius deleted the jruby branch January 23, 2024 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Need help resolving nkf for JRuby
5 participants