-
Notifications
You must be signed in to change notification settings - Fork 32
jruby support #21
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 #21
Conversation
|
I've fixed false positive failures with |
|
@knu Can you review this? I prefer to merge JRuby implementation to this repository. |
knu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, I think this is the way to go!
digest.gemspec
Outdated
| ext/digest/sha2/extconf.rb | ||
| ] | ||
|
|
||
| if RUBY_ENGINE == 'jruby' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use Gem::Platform for --platform option of gem build.
| if RUBY_ENGINE == 'jruby' | |
| if Gem::Platform === spec.platform and spec.platform =~ 'java' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks! should we change it here as well? https://github.com/ruby/psych/blob/master/psych.gemspec#L51
digest.gemspec
Outdated
| "ext/digest/bubblebabble/bubblebabble.c", "ext/digest/bubblebabble/extconf.rb", "ext/digest/defs.h", | ||
| "ext/digest/bubblebabble/bubblebabble.c", "ext/digest/bubblebabble/extconf.rb", "ext/digest/bubblebabble/lib/bubblebabble.rb", "ext/digest/defs.h", | ||
| "ext/digest/digest.c", "ext/digest/digest.h", "ext/digest/digest_conf.rb", "ext/digest/extconf.rb", | ||
| "ext/digest/md5/extconf.rb", "ext/digest/md5/md5.c", "ext/digest/md5/md5.h", "ext/digest/md5/md5cc.h", | ||
| "ext/digest/md5/md5init.c", "ext/digest/rmd160/extconf.rb", "ext/digest/rmd160/rmd160.c", | ||
| "ext/digest/rmd160/rmd160.h", "ext/digest/rmd160/rmd160init.c", "ext/digest/sha1/extconf.rb", | ||
| "ext/digest/sha1/sha1.c", "ext/digest/sha1/sha1.h", "ext/digest/sha1/sha1cc.h", | ||
| "ext/digest/md5/md5init.c", "ext/digest/md5/lib/md5.rb", "ext/digest/rmd160/extconf.rb", "ext/digest/rmd160/rmd160.c", | ||
| "ext/digest/rmd160/rmd160.h", "ext/digest/rmd160/rmd160init.c", "ext/digest/rmd160/lib/rmd160.rb", "ext/digest/sha1/extconf.rb", | ||
| "ext/digest/sha1/sha1.c", "ext/digest/sha1/sha1.h", "ext/digest/sha1/sha1cc.h", "ext/digest/sha1/lib/sha1.rb", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These added files should be inside if RUBY_ENGINE == 'jruby' block.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
java sources don't have to be part of a released gem, so I removed them instead
60bfe18 to
b0cdf61
Compare
|
JRuby's digest is licensed under EPL 2.0/GPL 2.0/LGPL 2.1 unlike MRI's. To my understanding it can't simply be relicensed under Ruby's/2-clause BSDL, so that has to be reflected in the I feel it's also worth mentioning in README that files under |
|
Can we switch the license in gemspec each platforms? |
0df8176 to
dbc83db
Compare
done! |
|
I will review quick as well but looks most of the issues have been addressed. If it would be better for us to relicense we can try to contact past contributors and get permission, but it would take some time. |
|
Committers to the Digest library in JRuby, as far back as 2006, before which only Ola contributed to it: Charles Oliver Nutter |
headius
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly build plumbing but the changes look fine to me.
|
@ahorek Have you tested this gem with a build of JRuby that does not include our built-in version? If that works then I think this is ready to go. |
|
@headius yes, I tested it together with jruby/jruby#6719 standard build jruby build as suggested by @nobu we can build a Java version directly from CRuby, but it doesn't work the opposite way, on JRuby the Java platform is forced, so you won't be able to build a version for CRuby on JRuby. |
|
I happily grant permission to relicense code I contributed. |
|
I think we should go ahead and merge this with the license disclaimer. If we really want to relicense open a separate issue and ping the folks I mentioned above for permission. Since only one replied here, it may take a little work to chase everyone down. |
|
I'm fine with re-licensing all code I contributed to JRuby to Ruby's/2-clause BSDL. |
|
👍 I consent to my contributions being relicensed under the Ruby license and the BSD 2-clause license. |
|
I am fine with relicensing all code to Ruby's/2-clause BSDL. |
|
I consent to my contributions being relicensed under the Ruby license and the BSD 2-clause license. |
|
Sorry for not coming back earlier. I am happy for this code to be in. The fragment I added in 2015 as part of the jruby/jruby#3238 PR, in fact, is just a mere port of an |
|
Hi everyone. I am Ola Bini - the owner of the @olabini account - which I'm currently locked out of. If any legal issues arise, I'm willing to provide offline government identification if necessary, to support this agreement. I consent to my contributions being relicensed under the Ruby license and the BSD 2-clause license. |
|
Happy. |
|
I think |
The autoloading stuff should be moved there, but common parts can stay there. |
|
But I think I can and should do that myself, because I'll need to modify the import script (to ruby/ruby) anyway. |
|
My proposal is to make JRuby libraries into a separate directory from the libraries under |
|
I agree with your proposal @nobu thanks for your help. |
JRuby does not have a separate source dir for .rb files associated with extensions. If |
That directory is for scripts to be installed by |
|
OK, I'll take this! Thanks to all the contributors who agreed with the license change! |
3b978c7 to
cfbec34
Compare
|
I've merged Nobu's changes and rebased against the current master. I think it should be ready. |
|
I just pushed #25 which should include the core parts of this PR while avoiding dynamic library file generation. Please look into it and leave any comments. |
|
Thank you all for your cooperation. This work has been merged, and I'll be working on a new gem release shortly. |
|
@knu Thank you! If possible, could you push a prerelease gem that we can run through JRuby CI, to ensure it is working properly? |
|
@headius Sure! I've pushed 3.1.0.pre0. https://rubygems.org/gems/digest/versions/3.1.0.pre0 |
|
Fixed and here's 3.1.0pre1. https://rubygems.org/gems/digest/versions/3.1.0.pre1 |
|
Argh, |
|
@knu Thank goodness for prerelease gems! I will test this on our 3.0 dev branch now. |
|
Looking good so far but I need to modify our build to copy the ext lib files for JRuby into our standard lib directory. Once I know everything is installing properly, I will let you know. |
|
@knu I believe it is working! You may go ahead and release 3.1.0. |
|
@headius Thank you! |
implements #20