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
Fix incorrect re-resolution when path gem excluded and not available #3902
Fix incorrect re-resolution when path gem excluded and not available #3902
Conversation
According to the debugging messages, if specs for a path gem are not available at `bundler/setup` time, but the group the gem belongs to has been excluded, it should be assume that the path source has no changes and continue. However, there's another check for re-resolution that checks completeness for the current platform that was not filtering for requested groups only, and making this case to incorrectly re-resolve, and as a result fail due to the path gem not being available (even if not requested). This commit should fix the problem.
Wow that was the fix ! So small 👍 I'm on paternity now; but I will try to test out the fix by EOW :) |
I know, bundler's code gets superconfusing. Your investigation in the original ticket was very helpful and on point, and made it much easier to figure this out. Still let's wait for the CI and your tests, hopefully this is correct. |
Congratulations, by the way 😄 |
thanks! Our codebase is pretty old & large so we do quite a lot of "interesting" Ruby/JRuby/Bundler/Warbler patterns. |
@fzakaria Did you find time to try this? No rush at all, I was just wondering, since I looked for the meaning of the EOW acronym and it means End of Week 😄 |
Yea ; sorry for the late reply! the baby is making things tough to follow-through on 👍 I tested it in fact with my minimal reproduction project. Here are the steps:
ruby '2.5.7', engine: 'jruby', engine_version: '9.2.13.0'
source 'https://rubygems.org'
group :development, :test do
gem 'demo', :path => "./ruby-gems/demo"
end
gem 'warbler', '2.0.5'
gem 'jruby-jars', '9.2.13.0'
PS: is there a more fancier way to test developing gems ? Python has the ability to perform a "dev install" which symlinks to the directory rather than building a full gem. |
Great, thanks so much for double checking even if it's hard now with the baby! ;)
With other gems, you would normally use the |
Merging since @fzakaria has confirmed this works and the PR received no other feedback. |
…eresolving Fix incorrect re-resolution when path gem excluded and not available (cherry picked from commit dfa7b0b)
…eresolving Fix incorrect re-resolution when path gem excluded and not available (cherry picked from commit dfa7b0b)
…eresolving Fix incorrect re-resolution when path gem excluded and not available (cherry picked from commit dfa7b0b)
…eresolving Fix incorrect re-resolution when path gem excluded and not available (cherry picked from commit dfa7b0b)
…eresolving Fix incorrect re-resolution when path gem excluded and not available (cherry picked from commit dfa7b0b)
…eresolving Fix incorrect re-resolution when path gem excluded and not available (cherry picked from commit dfa7b0b)
Description:
According to the debugging messages, if specs for a path gem are not available at
bundler/setup
time, but the group the gem belongs to has been excluded, it should be assumed that the path source has no changes and continue.However, there's another check for re-resolution that checks completeness for the current platform that was not filtering for requested groups only, and making this case to incorrectly re-resolve, and as a result fail due to the path gem not being available (even if not requested).
This commit should fix the problem.
Fixes #3177.
Tasks:
I will abide by the code of conduct.