Skip to content

Comments

Fix corrupted lockfile when running bundle check and having to re-resolve locally#5344

Merged
deivid-rodriguez merged 1 commit intomasterfrom
fix-lockfile-with-gemspec-directive-and-multiple-sources
Feb 11, 2022
Merged

Fix corrupted lockfile when running bundle check and having to re-resolve locally#5344
deivid-rodriguez merged 1 commit intomasterfrom
fix-lockfile-with-gemspec-directive-and-multiple-sources

Conversation

@deivid-rodriguez
Copy link
Contributor

@deivid-rodriguez deivid-rodriguez commented Feb 9, 2022

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

When running bundle check, and re-resolving locally because the gemspec has changed, we need to make sure the sources set in the previous lockfile are preserved.

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

Add requirements from locked specs to source requirements when resolving locally.

Fixes #5339.

Make sure the following tasks are checked

@deivid-rodriguez deivid-rodriguez marked this pull request as ready for review February 9, 2022 18:00
@deivid-rodriguez deivid-rodriguez changed the title Fix corrupted lockfile when using gemspec and multiple sources Fix corrupted lockfile when running bundle check and having to re-resolve locally Feb 9, 2022
@deivid-rodriguez deivid-rodriguez merged commit 46c9b07 into master Feb 11, 2022
@deivid-rodriguez deivid-rodriguez deleted the fix-lockfile-with-gemspec-directive-and-multiple-sources branch February 11, 2022 09:20
deivid-rodriguez added a commit that referenced this pull request Feb 23, 2022
…ctive-and-multiple-sources

Fix corrupted lockfile when running `bundle check` and having to re-resolve locally

(cherry picked from commit 46c9b07)
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 check corrupts gem's Gemfile.lock by moving gems between sources

1 participant