diff options
| author | Edouard CHIN <chin.edouard@gmail.com> | 2025-09-29 02:20:57 +0200 |
|---|---|---|
| committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2025-10-09 20:37:27 +0900 |
| commit | f96c332f5c00cd0fee0da79b6d415785bfa8d1f8 (patch) | |
| tree | 58dbc502ea4ec992f454761cd88d06a8bb792a52 /test/ruby | |
| parent | 960c28a4f84e8982fba61702a2ac7a89643ac4f6 (diff) | |
[rubygems/rubygems] Fix `bundle install` when the Gemfile contains "install_if" git gems:
- Fix https://github.com/rubygems/rubygems/pull/8985
- ### Problem
If you have a Gemfile that contains a `install_if` git gem, it will
be impossible to add other gems in the Gemfile and run
`bundle install`, you'll get a "The git source [...] is not yet
checked out".
### Context
The change that modified this behaviour was in https://github.com/rubygems/rubygems/commit/abbea0cc94dd,
and the issue is about the call to `current_dependencies`.
This call filters out irrelevant dependencies such as the one that
get condtionnally installed. By doing so, we skip over setting
the source based of the lockfile for that dependency
https://github.com/rubygems/rubygems/blob/ade324bdc8ea77b342f203cb7f3929a456d725ed/bundler/lib/bundler/definition.rb#L978
Ultimately, because of this, the dependency source doesn't have
any additional information such as the `revision`. Down the line,
when we end up to converge the spec, Bundler will attempt to get the
revision for that spec but won't be able to because the git source
isn't configured to allow running git operations.
### Solution
Filter out the irrelevant only spec only after we have set its
source.
https://github.com/rubygems/rubygems/commit/d2af439671
Diffstat (limited to 'test/ruby')
0 files changed, 0 insertions, 0 deletions
