Skip to content
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 standalone install crashing when using legacy gemfiles with multiple global sources #6918

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

deivid-rodriguez
Copy link
Member

@deivid-rodriguez deivid-rodriguez commented Aug 25, 2023

What was the end-user or developer problem that led to this PR?

If a legacy multi remote Gemfile depends transitively on a default gem, bundle install --standalone would crash.

What is your fix for the problem, implemented in this PR?

If a legacy Gemfile with multiple global sources depends transitively on a default gem, then in standalone mode we'd fail to fetch the proper version from the source that includes it, since we were adding it to specs (instead of remote_specs), which was already including the default version of the gem, and thus preventing the remote version from "overwriting that" and being added to the index. We should add it to the remote_specs index directly instead.

Fixes #6273.

Make sure the following tasks are checked

If a legacy multi remote Gemfile depends transitively on a default gem,
then in standalone mode we'd fail to fetch the proper version from the
source that includes it, since we were adding it to `specs` (instead of
`remote_specs`), which was already including the default version of the
gem, and thus preventing the remote version from "overwriting that" and
being added to the index. We should add it to the `remote_specs` index
directly instead.
@deivid-rodriguez deivid-rodriguez force-pushed the standalone-legacy-multi-global-sources branch from a017207 to 05f4f9d Compare August 25, 2023 10:46
@deivid-rodriguez deivid-rodriguez changed the title Fix standalone install crashing when using legacy multi remote gemfiles Fix standalone install crashing when using legacy gemfiles with multiple global sources Aug 25, 2023
@martinemde martinemde merged commit 0413e7c into master Aug 25, 2023
92 checks passed
@martinemde martinemde deleted the standalone-legacy-multi-global-sources branch August 25, 2023 23:28
deivid-rodriguez pushed a commit that referenced this pull request Sep 21, 2023
…-sources

Fix standalone install crashing when using legacy gemfiles with multiple global sources

(cherry picked from commit 0413e7c)
deivid-rodriguez pushed a commit that referenced this pull request Sep 21, 2023
…-sources

Fix standalone install crashing when using legacy gemfiles with multiple global sources

(cherry picked from commit 0413e7c)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bundle install --standalone broken with stdlibs for ruby 3.2
2 participants