-
Notifications
You must be signed in to change notification settings - Fork 110
RUBY-3651 Add support for jruby 10 #353
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
Conversation
The `fastGetModule` is deprecated in jruby 9.4 and removed in 10: https://github.com/jruby/jruby/blob/1611c8e4e464164474a0e8c0663e16d67fa5c268/core/src/main/java/org/jruby/Ruby.java#L1373-L1385 This commit uses the getModule method (which should bridge between 9 and 10). Note that it is marked deprecated in 10 but having the 9/10 compatability will be a win in the forseable future. https://github.com/jruby/jruby/blob/02c56b6099582500f86262a1d16d6b0e5cf3fe95/core/src/main/java/org/jruby/Ruby.java#L1339-L1342
It looks like latest features (including jruby 10 enablement) will require the latest minor release of the mongo gem. Specifically: The latest mongo gem relaxes the range for the ruby-bson gem. This would allow the uptake of mongodb/bson-ruby#353 if it is accepted.
|
Hey @donoghuc, our team had https://jira.mongodb.org/browse/RUBY-3651 on our plan for this quarter to review but haven't kicked that off yet. No duplication of effort at this point, and we'd be happy to get another set of eyes on it |
It looks like latest features (including jruby 10 enablement) will require the latest minor release of the mongo gem. Specifically: The latest mongo gem relaxes the range for the ruby-bson gem. This would allow the uptake of mongodb/bson-ruby#353 if it is accepted.
* Add less restrictive gem spec for mongo gem It looks like latest features (including jruby 10 enablement) will require the latest minor release of the mongo gem. Specifically: The latest mongo gem relaxes the range for the ruby-bson gem. This would allow the uptake of mongodb/bson-ruby#353 if it is accepted. * Update test expectations based on latest mongo gem This commit updates the test expectation for an updated message string. The same behavior is observbed, the message has just been updated. This commit also updates construction of a test mongodb client with a newly required value for auth_source when building a simple client.
|
Assigned |
|
Is there still progress with this PR? I am happy to contribute as well if it would help |
|
Oh, my bad, it slipped out of my view. Sorry about that, I'll look into it. Thank you for the contribution! |
|
@donoghuc @gillesbergerp There is one unexpected test failure on JRuby 10: Basically, I created a (relatively) simplified example that demonstrates the issue - https://github.com/10gen/get_long_value I was not able to find any mention of |
The getLongValue method is deprecated. Use RubyNumeric#num2long instead. this should be compatible with both jruby 9 and 10.
b9ed42a to
63bdd19
Compare
|
Thanks for the write up. I did some testing and proposed we use an alternate method which should preserve the behavior. I compared |
alexbevi
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.
LGTM
|
@donoghuc Thank you so much for your contribution! |
As a consumer of the mongo gem I want to run using jruby 10.
This commit starts this work, before I get too deep in it I want to make sure i'm not duplicating effort or if this is even something that would get any buy-in.
I noticed the first issue eaa3a1d attempting to even load the mongo gem. I attempted to add jruby 10 cells in CI to see other places that need update 63bdd19.
Thanks for looking :)