-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
bundle install fails since #5215 #5280
Comments
This issue has been triggered since #5215. Then reverting this merge commit workaround this issue. $ git revert -m1 e483fb2251845b7bb3ff1ac99aa5760699438ffe |
Grml 😢 I will look into it @headius ... |
Checking now also that other class is the same as self. Otherwise it will crash for anything other than DepProxy class or nil. Fixes jruby/jruby#5280 travis-ci/travis-ci#9994
Ok, I tracked this down now. This is a combination of two things:
I already submitted a fix to bundler, see rubygems/bundler#6669. However, probably we need to fix this on JRuby side as well as we don't know if bundler accepts the fix and when the will release a new version (and also we can not rely that all our users update to the new bundler version ...) 😢 So the only solution I see for now is that we always cache the hash value now. |
DepProxy#== crashed with an undefind method error for anything other than a DepProxy class or nil as parameter. This was caused that it was assumed only DepProxy instances or nil can get passed as parameter. This commit implements checking the class as well and returns false if the classes are not the same. Fixes jruby/jruby#5280 travis-ci/travis-ci#9994
DepProxy#== crashed with an undefind method error for anything other than a DepProxy class or nil as parameter. This was caused that it was assumed only DepProxy instances or nil can get passed as parameter. This commit implements checking the class as well and returns false if the classes are not the same. Fixes jruby/jruby#5280 travis-ci/travis-ci#9994
To save memory we decided to not cache the hash value of the keys anymore when using open addressing as this was only necessary for a fast bucket skip when a bin collision happens. With the current approach, when a bin collision happens we call eql? on the keys. This was reasonable as this only happens when a collision occours. However, with this approach we always call eql? when a bin collision happens even when the hashes are different as we only use the lower bits of the hash to calculate the bin where the key / value pair is stored. This causes now that wrong implementation of eql? will crash always on a bin collisions and not only on a bin AND hash collision. As this is the case for bundler, there is no other way than caching the hash values again to reduce the probability that this happens. Fixes jruby#5280 travis-ci/travis-ci#9994
Thanks for the fix. I have confirmed this issue has been addressed by this version. $ ruby -v
jruby 9.2.1.0-SNAPSHOT (2.5.0) 2018-07-31 067b279 Java HotSpot(TM) 64-Bit Server VM 25.181-b13 on 1.8.0_181-b13 [linux-x86_64] |
Fix DepProxy == method ### What was the end-user problem that led to this PR? After implementing a new hash table strategy in JRuby, bundle is broken for JRuby. The problem is caused that the ``==`` method in bundler does not check the class of the ``other`` object. This causes problems now when calling ``==`` on object other than DepProxy or nil. jruby/jruby#5280 travis-ci/travis-ci#9994 ### What was your diagnosis of the problem? The code crashes for anything other than DepProxy class or nil. ### What is your fix for the problem, implemented in this PR? Checking now also that other class is the same as self.
Fix DepProxy == method ### What was the end-user problem that led to this PR? After implementing a new hash table strategy in JRuby, bundle is broken for JRuby. The problem is caused that the ``==`` method in bundler does not check the class of the ``other`` object. This causes problems now when calling ``==`` on object other than DepProxy or nil. jruby/jruby#5280 travis-ci/travis-ci#9994 ### What was your diagnosis of the problem? The code crashes for anything other than DepProxy class or nil. ### What is your fix for the problem, implemented in this PR? Checking now also that other class is the same as self. (cherry picked from commit 1856133)
Fix DepProxy == method ### What was the end-user problem that led to this PR? After implementing a new hash table strategy in JRuby, bundle is broken for JRuby. The problem is caused that the ``==`` method in bundler does not check the class of the ``other`` object. This causes problems now when calling ``==`` on object other than DepProxy or nil. jruby/jruby#5280 travis-ci/travis-ci#9994 ### What was your diagnosis of the problem? The code crashes for anything other than DepProxy class or nil. ### What is your fix for the problem, implemented in this PR? Checking now also that other class is the same as self.
Environment
jruby -v
) and command line (flags, JRUBY_OPTS, etc)uname -a
)Other relevant info you may wish to add:
Steps to reproduce
Gemfile
gem install bundler
bundle install
Expected Behavior
Bundle should pass.
Actual Behavior
The text was updated successfully, but these errors were encountered: